summaryrefslogtreecommitdiffstats
path: root/bin/getpkgtree
blob: b8787b186440ff18dcab503ef6924a3db1888c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

prog=getpkgtree

if [ "$#" -ne 2 ]
then
	echo "usage: $prog [file] [section]"
	exit 2
fi

if ! [ -d PKGTREE ]
then
	echo "$prog: PKGTREE directory does not exist" 1>&2
	exit 100
fi
[ -d "PKGTREE/$1" ] || exit 101
[ -d "PKGTREE/$1/$2" ] || exit 102
find "PKGTREE/$1/$2" -maxdepth 1 -type f | sort | xargs cat