aboutsummaryrefslogtreecommitdiff
path: root/revdep
diff options
context:
space:
mode:
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 && {