3 # note this works for both a.out and ELF executables
4 # it also auto-generates requirment lines for shell scripts
8 filelist=`sed "s/['\"]/\\\&/g"`
9 scriptlist=`echo $filelist | xargs -r file | egrep ":.* (commands|script) " | cut -d: -f1 `
12 for f in $scriptlist; do
14 interp=`head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1 `
16 */perl) perllist="$perllist $f" ;;
20 for f in $filelist; do
22 if echo $f | grep -q '\.pm$'
28 [ -n "$modules" ] && perllist="$perllist $modules"
31 # Generate perl module dependencies, if any.
33 [ -x /usr/lib/rpm/perl.req -a -n "$perllist" ] && \
34 echo $perllist | tr [:blank:] \\n | /usr/lib/rpm/perl.req | sort -u
37 # Then process the files as usual.
39 echo $filelist | /usr/lib/rpm/find-requires