diff options
Diffstat (limited to 'package/dir')
-rwxr-xr-x | package/dir | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/package/dir b/package/dir new file mode 100755 index 0000000..ab9b8a0 --- /dev/null +++ b/package/dir @@ -0,0 +1,19 @@ +#!/bin/sh +shout() { echo "$0: $@" >&2; } +barf() { shout "fatal: $@"; exit 111; } +safe() { "$@" || barf "cannot $@"; } + +here=`env - PATH=$PATH pwd` +mypwd=${here%package} +mypwd=${mypwd%/} +home=`head -1 $mypwd/conf-home` + +if [ -d $home ] +then + shout "Keeping directory $home." + shout "The queue directory will use now bigtodo ..." +else + safe mkdir -p $home +fi + +exit 0 |