From 6bf8c0596147cd1bc7e5986ad2c15f45536da0e5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Apr 2025 11:18:40 +0100 Subject: [PATCH] libtool-kill-dependency_libs.sh: Ensure this only runs on *.la files Fixes: https://github.com/libguestfs/libguestfs/issues/182 Reported-by: Mohamed Akram --- libtool-kill-dependency_libs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libtool-kill-dependency_libs.sh b/libtool-kill-dependency_libs.sh index 73489df33..3b0e111e9 100755 --- a/libtool-kill-dependency_libs.sh +++ b/libtool-kill-dependency_libs.sh @@ -50,10 +50,11 @@ done #echo "${args[@]}" "${args[@]}" -if [ -n "$output" ]; then +# Only do this for *.la files. +case "$output" in *.la ) cp -p "$output" "$output.tmp" # Remove dependency_libs from output. sed "s/^dependency_libs=.*/dependency_libs=''/" < "$output.tmp" > "$output" rm "$output.tmp" -fi +esac