diff options
| author | emmett1 <emmett1.2miligrams@protonmail.com> | 2024-12-25 22:14:36 +0800 |
|---|---|---|
| committer | emmett1 <emmett1.2miligrams@protonmail.com> | 2024-12-25 22:14:36 +0800 |
| commit | a49505b39f680d910148f5678a5b31cb3f8e3db4 (patch) | |
| tree | d2eefa58393b9d079a931a01afb6a3a695ff9485 /revdep | |
| parent | 8bc336fa6fae5b7c7dde2afa70750f089a04c843 (diff) | |
| download | autils-a49505b39f680d910148f5678a5b31cb3f8e3db4.tar.gz autils-a49505b39f680d910148f5678a5b31cb3f8e3db4.zip | |
updates
Diffstat (limited to 'revdep')
| -rwxr-xr-x | revdep | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 && { |