diff options
author | Roland McGrath <roland@redhat.com> | 2009-01-04 05:37:00 -0800 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2009-01-04 05:37:00 -0800 |
commit | 2542b3131ea4d56f52b5bfeef15d9a63f03611e0 (patch) | |
tree | 877e020bdd0577f1a7d02590cdc3e86a38d72ccf | |
parent | 89a9a010985edfa0ba8acbf96f8e0ba0fa3c2055 (diff) | |
download | debuginfo-test-scripts-2542b3131ea4d56f52b5bfeef15d9a63f03611e0.tar.gz debuginfo-test-scripts-2542b3131ea4d56f52b5bfeef15d9a63f03611e0.tar.xz debuginfo-test-scripts-2542b3131ea4d56f52b5bfeef15d9a63f03611e0.zip |
fix argument case
-rwxr-xr-x | list-files.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/list-files.sh b/list-files.sh index ca1e2e7..7cd6019 100755 --- a/list-files.sh +++ b/list-files.sh @@ -7,9 +7,10 @@ norel) names='-name exec -o -name dyn' ;; esac shift -[ $# -gt 0 ] || set . +depth=1 +[ $# -gt 0 ] || { depth=2; set .; } -find "$@" -mindepth 2 -maxdepth 2 \( $names \) ! -size 0 -print | +find "$@" -mindepth $depth -maxdepth $depth \( $names \) ! -size 0 -print | while read f; do f="${f#./}" d="${f%/*}" |