diff options
author | Justin Davis <jrcd83@gmail.com> | 2012-03-05 22:49:56 +0100 |
---|---|---|
committer | Justin Davis <jrcd83@gmail.com> | 2012-03-05 22:49:56 +0100 |
commit | 75bddd0e24674d76a2518dcbdced5a015b550775 (patch) | |
tree | c6cc9e33ced7447a0ad0ef08f66eb660120d1b2e /bin/getpkgtree | |
parent | bd9d357c9344f9c23919f5300ce780be2e2ddda0 (diff) | |
download | genpkg-75bddd0e24674d76a2518dcbdced5a015b550775.tar.gz genpkg-75bddd0e24674d76a2518dcbdced5a015b550775.tar.xz |
Replace old pkgtree scripts with new simpler ones.
Diffstat (limited to 'bin/getpkgtree')
-rwxr-xr-x | bin/getpkgtree | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/getpkgtree b/bin/getpkgtree new file mode 100755 index 0000000..dd2517c --- /dev/null +++ b/bin/getpkgtree @@ -0,0 +1,22 @@ +#!/bin/sh + +prog=getpkgtree + +if [ "$#" -ne 2 ] +then + echo "usage: $prog [file] [section]" + exit 2 +fi + +if ! [ -d "$1" ] +then + echo "$prog: package file does not exist: $1" 1>&2 + exit 101 +fi +if ! [ -d "$1/$2" ] +then + echo "$prog: section does not exist: $2" 1>&2 + exit 102 +fi + +find "$1/$2" -maxdepth 1 -type f | sort | xargs cat |