summaryrefslogtreecommitdiffstats
path: root/bin/getpkgtree
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2012-03-05 23:29:51 +0100
committerJustin Davis <jrcd83@gmail.com>2012-03-05 23:29:51 +0100
commit0873b3e326586ff2b7b3b0e6cbdd85e1a31ec4ad (patch)
treeec4aaaa82dd8a1b4ebc496737adcc0ab7e5668dd /bin/getpkgtree
parent75bddd0e24674d76a2518dcbdced5a015b550775 (diff)
downloadgenpkg-0873b3e326586ff2b7b3b0e6cbdd85e1a31ec4ad.tar.gz
genpkg-0873b3e326586ff2b7b3b0e6cbdd85e1a31ec4ad.tar.xz
Make pkgtree scripts simpler still.
Diffstat (limited to 'bin/getpkgtree')
-rwxr-xr-xbin/getpkgtree16
1 files changed, 6 insertions, 10 deletions
diff --git a/bin/getpkgtree b/bin/getpkgtree
index dd2517c..38d4930 100755
--- a/bin/getpkgtree
+++ b/bin/getpkgtree
@@ -8,15 +8,11 @@ then
exit 2
fi
-if ! [ -d "$1" ]
+if ! [ -d PKGTREE ]
then
- echo "$prog: package file does not exist: $1" 1>&2
- exit 101
+ echo "$prog: PKGTREE directory does not exist" 1>&2
+ exit 100
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
+[ -d "PKGTREE/$1" ] || exit 101
+[ -d "PKGTREE/$1/$2" ] || exit 101
+find "PKGTREE/$1/$2" -maxdepth 1 -type f | sort | xargs cat