Index: pkgmk.in =================================================================== --- pkgmk.in (revision 1218) +++ pkgmk.in (working copy) @@ -58,16 +58,10 @@ fi } -check_directory() { - if [ ! -d $1 ]; then - error "Directory '$1' does not exist." +make_directory() { + if ! mkdir -p $1; then + error "Could not create needed directory '$1'" exit 1 - elif [ ! -w $1 ]; then - error "Directory '$1' not writable." - exit 1 - elif [ ! -x $1 ] || [ ! -r $1 ]; then - error "Directory '$1' not readable." - exit 1 fi } @@ -562,9 +556,9 @@ . $FILE done - check_directory "$PKGMK_SOURCE_DIR" - check_directory "$PKGMK_PACKAGE_DIR" - check_directory "`dirname $PKGMK_WORK_DIR`" + make_directory "$PKGMK_SOURCE_DIR" + make_directory "$PKGMK_PACKAGE_DIR" + make_directory "$PKGMK_WORK_DIR" check_pkgfile