diff options
Diffstat (limited to 'bin/catpkgtree')
-rw-r--r-- | bin/catpkgtree | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/bin/catpkgtree b/bin/catpkgtree deleted file mode 100644 index 846655c..0000000 --- a/bin/catpkgtree +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -PROG=catpkgtree - -findnode() -{ - for f in * - do - [ "$f" = '*' ] && break - [ -f "$f" ] || continue - case f in - [0-9][0-9]-*) - n=`echo "$f" | sed 's/^...//'` - if [ "$n" = "$1" ] - then - echo "$f" - return 0 - fi - esac - done - return 1 -} - -if [ $# -ne 1 ] -then - echo "usage: $PROG [tree path] < [text to append]" 1>&2 - exit 2 -fi - -if ! cd PKGTREE -then - echo "$PROG: PKGTREE dir must be present in current dir" 1>&2 - exit 100 -fi - -IFS=/ set -- "$1" -if [ $# -lt 2 ] -then - echo "$PROG: path to tree node must be separated by forward slashes" 1>&2 - exit 101 -fi - -if ! cd "$1" -then - echo "$PROG: $1 is not a valid package file" 1>&2 - exit 102 -fi -shift - -while [ $# -gt 1 ] -do - f=`findnode $1` - if [ $? -ne 0 ] || ! cd "$f" - then - echo "$PROG: $1 is not a valid node name" >1&2 - exit 102 - fi - shift -done - -f=`findnode $1` -if [ $? -ne 0 ] || [ ! -f "$f" ] -then - echo "$PROG: $f is not a valid final node" 1>&2 - exit 102 -fi -cat >> "$f" |