diff options
Diffstat (limited to 'bin/initpkgtree')
-rwxr-xr-x | bin/initpkgtree | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/bin/initpkgtree b/bin/initpkgtree deleted file mode 100755 index 77d8e47..0000000 --- a/bin/initpkgtree +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# Initializes files and their sections in a package tree directory structure. -# Assumes we are already inside of a package tree's root directory. - -prog=initpkgtree - -if [ $# -eq 0 ] -then - echo "usage: $prog [filename] [section 1] [section 2] [...]" 1>&2 - exit 2 -fi - -if [ -d "$1" ] -then - echo "$prog: a file named $1 already exists in the package tree" 1>&2 - exit 101 -fi - -dups=`for sect; do echo "$sect"; done | awk ' -{ dups[$1]++ } END { for(d in dups) if(dups[d] > 1) printf d " " }' -` -if [ "$dups" ] -then - echo "$prog: duplicate sections not permitted: $dups" 1>&2 - exit 102 -fi - -mkdir "$1" -cd "$1" -shift - -for sect -do - d="$sect" - mkdir "$d" - for f in beg body end - do - touch "$d/$f" - done -done |