summaryrefslogtreecommitdiffstats
path: root/libtool-kill-dependency_libs.sh
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2010-11-26 18:26:09 +0000
committerRichard W.M. Jones <rjones@redhat.com>2010-11-26 18:26:09 +0000
commit60b3c8e81124a881cd93ed66c167cac37e87c36b (patch)
treeeb75e80d26fbc3a3343175c2b124e21a4e0da324 /libtool-kill-dependency_libs.sh
parent9e6a8a4cbb30f6f4718669db0c4f7781ea3d6249 (diff)
downloadlibguestfs-60b3c8e81124a881cd93ed66c167cac37e87c36b.tar.gz
libguestfs-60b3c8e81124a881cd93ed66c167cac37e87c36b.tar.xz
libguestfs-60b3c8e81124a881cd93ed66c167cac37e87c36b.zip
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.
Diffstat (limited to 'libtool-kill-dependency_libs.sh')
-rwxr-xr-xlibtool-kill-dependency_libs.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/libtool-kill-dependency_libs.sh b/libtool-kill-dependency_libs.sh
index 1403fbe2..9f17038c 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