find-requires (Linux) adds requirements for shell interpretors
CVS patchset: 1816 CVS date: 1997/09/01 15:55:56
This commit is contained in:
parent
65905e2ee7
commit
6dd1dc3c14
2
CHANGES
2
CHANGES
|
@ -1,5 +1,7 @@
|
|||
2.4.6 -> 2.4.7:
|
||||
- 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:
|
||||
- added os_canon entries for BSD/OS and NextStep
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
# note this works for both a.out and ELF executables
|
||||
# it also auto-generates requirment lines for shell scripts
|
||||
|
||||
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 }'
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue