Current Path : /compat/linux/proc/self/root/usr/local/lib/rpm/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/self/root/usr/local/lib/rpm/find-requires |
#!/bin/sh # ---------------------------------------------------------------- # find-requires for FreeBSD-2.2.x # how do we know what is required by a.out shared libraries? # ---------------------------------------------------------------- ulimit -c 0 filelist=`sed "s/['\"]/\\\&/g"` exelist=`echo $filelist | xargs file | fgrep executable | cut -d: -f1 ` scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 ` for f in $exelist; do if [ -x $f ]; then ldd $f | /usr/bin/awk '/=>/&&!/not found/ { print $3 }' fi done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u for f in $scriptlist; do if [ -x $f ]; then head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1 fi done | sort -u