From: Richard W.M. Jones Date: Fri, 26 Nov 2010 18:26:09 +0000 (+0000) Subject: libtool fix: Don't do fix if there was no -o option to libtool. X-Git-Tag: 1.7.16~3 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=60b3c8e81124a881cd93ed66c167cac37e87c36b;p=libguestfs.git libtool fix: Don't do fix if there was no -o option to libtool. For example if libtool is being run as 'libtool --mode=execute ...' This fixes commit 4cf4f2b66f850bb39c5bf29d3cd12ada9114d67e. --- diff --git a/libtool-kill-dependency_libs.sh b/libtool-kill-dependency_libs.sh index 1403fbe..9f17038 100755 --- a/libtool-kill-dependency_libs.sh +++ b/libtool-kill-dependency_libs.sh @@ -49,9 +49,12 @@ done # Run libtool as normal. #echo "${args[@]}" "${args[@]}" -mv "$output" "$output.tmp" -# Remove dependency_libs from output. -sed "s/^dependency_libs=.*/dependency_libs=''/" < "$output.tmp" > "$output" -chmod --reference="$output.tmp" "$output" -rm "$output.tmp" +if [ -n "$output" ]; then + mv "$output" "$output.tmp" + + # Remove dependency_libs from output. + sed "s/^dependency_libs=.*/dependency_libs=''/" < "$output.tmp" > "$output" + chmod --reference="$output.tmp" "$output" + rm "$output.tmp" +fi