From 75bddd0e24674d76a2518dcbdced5a015b550775 Mon Sep 17 00:00:00 2001 From: Justin Davis Date: Mon, 5 Mar 2012 16:49:56 -0500 Subject: Replace old pkgtree scripts with new simpler ones. --- bin/getpkgtree | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 bin/getpkgtree (limited to 'bin/getpkgtree') 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 -- cgit v1.2.3-24-g4f1b