find-requires (Linux) adds requirements for shell interpretors

CVS patchset: 1816
CVS date: 1997/09/01 15:55:56
This commit is contained in:
ewt 1997-09-01 15:55:56 +00:00
parent 65905e2ee7
commit 6dd1dc3c14
2 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,7 @@
2.4.6 -> 2.4.7: 2.4.6 -> 2.4.7:
- had some wrong month lengths in changelog date parsing - had some wrong month lengths in changelog date parsing
- updated fine-requires (Linux version) to add lines for shell
scripts (Donnie Barnes)
2.4.5 -> 2.4.6: 2.4.5 -> 2.4.6:
- added os_canon entries for BSD/OS and NextStep - added os_canon entries for BSD/OS and NextStep

View File

@ -1,12 +1,18 @@
#!/bin/sh #!/bin/sh
# note this works for both a.out and ELF executables # note this works for both a.out and ELF executables
# it also auto-generates requirment lines for shell scripts
ulimit -c 0 ulimit -c 0
filelist=`sed "s/['\"]/\\\&/g" | xargs -r file | fgrep executable | cut -d: -f1 ` filelist=`sed "s/['\"]/\\\&/g"`
exelist=`echo $filelist | xargs -r file | fgrep executable | cut -d: -f1 `
scriptlist=`echo $filelist | xargs -r file | egrep ":.*(perl|script)" | cut -d: -f1 `
for f in $filelist; do for f in $exelist; do
ldd $f | awk '/=>/ { print $1 }' ldd $f | awk '/=>/ { print $1 }'
done | sort -u | sed "s/['\"]/\\\&/g" | xargs -r -n 1 basename | sort -u done | sort -u | sed "s/['\"]/\\\&/g" | xargs -r -n 1 basename | sort -u
for f in $scriptlist; do
head -1 $f | sed -e 's/^\#\!//' | cut -d" " -f1
done | sort -u