From 1b2d1c32ce63cb71fb1867cd02fd1f656ca897ec Mon Sep 17 00:00:00 2001 From: Fabian Castelli Date: Mon, 7 Jun 2021 17:16:50 +0200 Subject: [PATCH] Update prefix option handling --- candi.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/candi.sh b/candi.sh index 7658a24..2104cd8 100755 --- a/candi.sh +++ b/candi.sh @@ -71,8 +71,6 @@ while [ -n "$1" ]; do ;; -p=*|--prefix=*) PREFIX="${param#*=}" - # replace '~' by $HOME - PREFIX=${PREFIX/#~\//$HOME\/} ;; ##################################### @@ -116,8 +114,11 @@ while [ -n "$1" ]; do shift done -# replace '~' by $HOME: +# Check the input argument of the install path and (if used) replace the tilde +# character '~' by the users home directory ${HOME}. Afterwards clear the +# PREFIX input variable. PREFIX_PATH=${PREFIX/#~\//$HOME\/} +unset PREFIX RE='^[0-9]+$' if [[ ! "${JOBS}" =~ ${RE} || ${JOBS}<1 ]] ; then -- 2.39.5