From a49505b39f680d910148f5678a5b31cb3f8e3db4 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Wed, 25 Dec 2024 22:14:36 +0800 Subject: updates --- revdep | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'revdep') diff --git a/revdep b/revdep index 4ca65c6..d9cd903 100755 --- a/revdep +++ b/revdep @@ -24,8 +24,13 @@ while read -r line; do fi case "$(file -bi "$line")" in *application/x-sharedlib* | *application/x-executable* | *application/x-pie-executable*) - missinglib=$(ldd /$line 2>&1 | grep "Error loading shared library" | awk '{print $5}' | sed 's/://' | sort | uniq) - #missinglib=$(ldd /$line 2>&1 | grep "not found" | awk '{print $1}' | sort | uniq) + if [ -e /lib/ld-musl-x86_64.so.1 ] || [ -e /usr/lib/ld-musl-x86_64.so.1 ]; then + # musl system + missinglib=$(ldd /$line 2>&1 | grep "Error loading shared library" | awk '{print $5}' | sed 's/://' | sort | uniq) + else + # glibc system + missinglib=$(ldd /$line 2>&1 | grep "not found" | awk '{print $1}' | sort | uniq) + fi if [ "$missinglib" ]; then for i in $missinglib; do objdump -p /$line | grep NEEDED | awk '{print $2}' | grep -qx $i && { -- cgit v1.2.3