Modify eu-strip option to perform strip in post script of rpm package & add option...
[platform/upstream/rpm.git] / autodeps / freebsd.req
1 #!/bin/sh
2 # ----------------------------------------------------------------
3 #       find-requires for FreeBSD-2.2.x
4 #       how do we know what is required by a.out shared libraries?
5 # ----------------------------------------------------------------
6 ulimit -c 0
7
8 filelist=`sed "s/['\"]/\\\&/g"`
9 exelist=`echo $filelist | xargs file | grep -F executable | cut -d: -f1 `
10 scriptlist=`echo $filelist | xargs file | grep -E ":.* (commands|script) " | cut -d: -f1 `
11
12 for f in $exelist; do
13     if [ -x $f ]; then
14         ldd $f | /usr/bin/awk '/=>/&&!/not found/ { print $3 }'
15     fi
16 done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u
17
18 for f in $scriptlist; do
19     if [ -x $f ]; then
20         head -1 $f | sed -e 's/^\#\![   ]*//' | cut -d" " -f1
21     fi
22 done | sort -u