Return to find_depends CVS log | Up to [local] / openbsd / fill_chroot |
File: [local] / openbsd / fill_chroot / find_depends (download)
Revision 1.13, Tue Sep 30 20:54:01 2008 UTC (15 years, 9 months ago) by andrew
much simpler find_depends that is written as a shell script. |
#!/bin/sh # $RedRiver$ find_depends() { local _file="$1" local _line test -z "$_file" && continue /usr/bin/ldd "$_file" | awk '$7 ~ /^\// { print $7 }' | { while read _line; do test -z "$_line" && continue echo $_line test X"$_file" == X"$_line" && continue find_depends "$_line" done } } { for f in "$@"; do find_depends "$f" done } | sort -u