1) look for => instead of ! "statically linked"
authorewt <devnull@localhost>
Thu, 21 Nov 1996 22:05:26 +0000 (22:05 +0000)
committerewt <devnull@localhost>
Thu, 21 Nov 1996 22:05:26 +0000 (22:05 +0000)
2) don't follow symlinks
3) use basename on lib names

CVS patchset: 1182
CVS date: 1996/11/21 22:05:26

autodeps/linux.req

index 2b28a86..3566c7b 100644 (file)
@@ -2,8 +2,8 @@
 
 # note this works for both a.out and ELF executables
 
-filelist=$(xargs file -L 2>/dev/null | grep "executable" | cut -d: -f1)
+filelist=$(xargs file 2>/dev/null | grep "executable" | cut -d: -f1)
 
 for f in $filelist; do
-    ldd $f | grep -v 'statically linked' | awk '{ print $1 }'
-done | sort -u
+    ldd $f | grep '=>' | awk '{ print $1 }'
+done | sort -u | xargs -r -n 1 basename | sort -u