aboutsummaryrefslogtreecommitdiff
path: root/revdep
diff options
context:
space:
mode:
authoremmett1 <emmett1.2miligrams@protonmail.com>2024-12-25 22:14:36 +0800
committeremmett1 <emmett1.2miligrams@protonmail.com>2024-12-25 22:14:36 +0800
commita49505b39f680d910148f5678a5b31cb3f8e3db4 (patch)
treed2eefa58393b9d079a931a01afb6a3a695ff9485 /revdep
parent8bc336fa6fae5b7c7dde2afa70750f089a04c843 (diff)
downloadautils-a49505b39f680d910148f5678a5b31cb3f8e3db4.tar.gz
autils-a49505b39f680d910148f5678a5b31cb3f8e3db4.zip
updates
Diffstat (limited to 'revdep')
-rwxr-xr-xrevdep9
1 files changed, 7 insertions, 2 deletions
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 && {