#!/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