From e95c26c3bf9645ef67db4e3cce7a8edf9e7bbd77 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Mon, 27 Mar 2006 20:21:11 +0000 Subject: [PATCH] Added a poor-man test to --directory switch. --- master.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/master.sh b/master.sh index 59c380d..c1a5f1a 100755 --- a/master.sh +++ b/master.sh @@ -127,10 +127,19 @@ while test $# -gt 0 ; do --directory | -D ) test $# = 1 && eval "$exit_missing_arg" shift - BUILDDIR=$1 - JHALFSDIR=$BUILDDIR/jhalfs - LOGDIR=$JHALFSDIR/logs - MKFILE=$JHALFSDIR/Makefile + case $1 in + -* ) + echo -e "\n$1 isn't a valid build directory\n." + echo -e "Directory names can't start with - .\n" + exit 1 + ;; + * ) + BUILDDIR=$1 + JHALFSDIR=$BUILDDIR/jhalfs + LOGDIR=$JHALFSDIR/logs + MKFILE=$JHALFSDIR/Makefile + ;; + esac ;; --get-packages | -G ) HPKG=1 ;;