From 40c2eb8c5f5a63dd200c4e3f87bf515a4b097152 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 8 Feb 2016 17:28:02 -0500 Subject: [PATCH] fix handling of -p --- candi.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.5