9393e2e5965e667c977d4c8be7b51aae6e2f73e5
[platform/upstream/rpm.git] / autodeps / solaris.req
1 #!/bin/sh
2
3 # note this works for both a.out and ELF executables
4
5 PATH=/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin
6 export PATH
7
8 ulimit -c 0
9
10 filelist=`sed "s/['\"]/\\\&/g"`
11 [ -z $filelist ] && exit #emulate -r option for xargs
12
13 for f in `echo $filelist | xargs file | fgrep executable | cut -d: -f1`; do
14     ldd $f 2>/dev/null | awk '/\=\>/ { print $1 }'
15 done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u
16