[BACK]Return to find_depends CVS log [TXT][DIR] Up to [local] / openbsd / fill_chroot

Annotation of openbsd/fill_chroot/find_depends, Revision 1.14

1.13      andrew      1: #!/bin/sh
1.14    ! andrew      2: # $AFresh1$
1.1       andrew      3:
1.13      andrew      4: find_depends() {
                      5:     local _file="$1"
                      6:     local _line
                      7:
                      8:     test -z "$_file" && continue
                      9:
                     10:     /usr/bin/ldd "$_file" | awk '$7 ~ /^\// { print $7 }' | {
                     11:         while read _line; do
                     12:             test -z "$_line"            && continue
                     13:             echo $_line
                     14:
                     15:             test X"$_file" == X"$_line" && continue
                     16:             find_depends "$_line"
                     17:         done
1.11      andrew     18:     }
1.1       andrew     19: }
                     20:
                     21: {
1.13      andrew     22:     for f in  "$@"; do
                     23:         find_depends "$f"
                     24:     done
                     25: } | sort -u
1.1       andrew     26:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>