]> https://gitweb.dealii.org/ - candi.git/commitdiff
Update prefix option handling 210/head
authorFabian Castelli <fabian.castelli@kit.edu>
Mon, 7 Jun 2021 15:16:50 +0000 (17:16 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Tue, 29 Jun 2021 09:07:58 +0000 (11:07 +0200)
candi.sh

index 7658a24800ef683ed7dcf0a8775976a8febca03f..2104cd8e39454081c0b71527fc26b35a3e2017df 100755 (executable)
--- 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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.