From 60b3c8e81124a881cd93ed66c167cac37e87c36b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 26 Nov 2010 18:26:09 +0000 Subject: [PATCH] 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. --- libtool-kill-dependency_libs.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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 -- 1.8.3.1