Created
November 6, 2019 14:20
-
-
Save proditis/5d27b6be16e16796ae185e4bdc711f5b to your computer and use it in GitHub Desktop.
Scan a file for linked libraries recursively and generate list of distinct libs needed in a chroot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
libslist=$(ldd $1|grep rlib|awk '{print $NF}') | |
echo $1>paths.lst | |
for i in $libslist;do | |
echo $i | |
ldd $i|grep rlib|awk '{print $NF}' | |
done|sort -u >>paths.lst | |
cat paths.lst |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment