diff --git a/libtool-kill-dependency_libs.sh b/libtool-kill-dependency_libs.sh index 3d5f318b3d..73489df339 100755 --- a/libtool-kill-dependency_libs.sh +++ b/libtool-kill-dependency_libs.sh @@ -51,10 +51,9 @@ done "${args[@]}" if [ -n "$output" ]; then - mv "$output" "$output.tmp" + cp -p "$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