From: root Date: Fri, 7 Nov 2008 11:40:45 +0000 (+0100) Subject: system: Let addsite always make DIR absolute. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=a8068be88699ef7b807284319f4a65d01b58ca5f;p=matthijs%2Fservers%2Fdrsnuggles.git system: Let addsite always make DIR absolute. --- diff --git a/usr/local/bin/addsite b/usr/local/bin/addsite index 44d39b8..d2f515e 100755 --- a/usr/local/bin/addsite +++ b/usr/local/bin/addsite @@ -21,7 +21,10 @@ PHP_CONFIG=conf/php.ini.override # PHP error logfile to set error_log to PHP_ERRORLOG=logs/php.log -DIR=$1 +# Get dir, but make it absolute +cd "$1" +DIR=`pwd` + if [ -e "$DIR" -a ! -d "$DIR" ]; then echo "$DIR" must be a directory, or not exist yet.