instpkg cleanup
[cmdllinux.git] / scripts / _readelf_libs
blobd5619d583694b747858045bf7b3e88c334ef0017
1 #! /bin/sh
3 [ "$1" = "-n" ] && nofile=1 && shift
4 if [ ! -z "$1" ]; then
5 DIR=$1
6 [ ! -d "$DIR" ] && echo "No such directory" && exit 1
7 cd $DIR
8 fi
10 if [ "$nofile" = "1" ]; then
11 _findbin | xargs -r -i sh -c 'readelf -d {} | grep "^ 0x[0-9a-f]\+ (NEEDED)" | grep -o "\[.*\]"'
12 else
13 _findbin | xargs -r -i sh -c 'echo "./{}"; readelf -d {} | grep "^ 0x[0-9a-f]\+ (NEEDED)" | grep -o "\[.*\]"'