From 6dd1dc3c14a8d5c90b22e31e4268aeb4d4484ba2 Mon Sep 17 00:00:00 2001 From: ewt Date: Mon, 1 Sep 1997 15:55:56 +0000 Subject: [PATCH] find-requires (Linux) adds requirements for shell interpretors CVS patchset: 1816 CVS date: 1997/09/01 15:55:56 --- CHANGES | 2 ++ autodeps/linux.req | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 7b6655049..585ddff2a 100644 --- a/CHANGES +++ b/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 diff --git a/autodeps/linux.req b/autodeps/linux.req index 7ad13feea..eb1f6f4b2 100644 --- a/autodeps/linux.req +++ b/autodeps/linux.req @@ -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