From: Timo Heister Date: Mon, 8 Feb 2016 22:28:02 +0000 (-0500) Subject: fix handling of -p X-Git-Tag: v0.8.4~6^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40c2eb8c5f5a63dd200c4e3f87bf515a4b097152;p=candi.git fix handling of -p --- diff --git a/candi.sh b/candi.sh index 2e931f7..538e185 100755 --- a/candi.sh +++ b/candi.sh @@ -61,6 +61,10 @@ while [ -n "$1" ]; do ##################################### # Prefix path + -p) + shift + PREFIX="${1}" + ;; -p=*|--prefix=*) PREFIX="${param#*=}" # replace '~' by $HOME @@ -93,7 +97,8 @@ while [ -n "$1" ]; do shift done -PREFIX_PATH=${PREFIX:-~/apps/candi} +# replace '~' by $HOME: +PREFIX_PATH=${PREFIX/#~\//$HOME\/} RE='^[0-9]+$' if [[ ! "$PROCS" =~ $RE || $PROCS<1 ]] ; then