]> https://gitweb.dealii.org/ - candi.git/commitdiff
fix handling of -p
authorTimo Heister <timo.heister@gmail.com>
Mon, 8 Feb 2016 22:28:02 +0000 (17:28 -0500)
committerTimo Heister <timo.heister@gmail.com>
Mon, 8 Feb 2016 22:28:02 +0000 (17:28 -0500)
candi.sh

index 2e931f753c9afe6c28c8b366ddb9050ff88389a2..538e185eeaf24914fc96fcadcd9a0f8cd46630c8 100755 (executable)
--- 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

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.