]> https://gitweb.dealii.org/ - candi.git/commitdiff
handle -j with space
authorTimo Heister <timo.heister@gmail.com>
Thu, 4 Feb 2016 23:30:51 +0000 (18:30 -0500)
committerTimo Heister <timo.heister@gmail.com>
Thu, 4 Feb 2016 23:30:51 +0000 (18:30 -0500)
candi.sh

index 1d2942dbe4366db773ed2f8acd9e54a39df360b4..c8668c7c2c892bb9a6f3930825990ef0612c42fb 100755 (executable)
--- a/candi.sh
+++ b/candi.sh
@@ -39,7 +39,8 @@ TIC_GLOBAL="$(${DATE_CMD} +%s%N)"
 
 ################################################################################
 # Parse command line input parameters
-for param in "$@"; do
+while [ -n "$1" ]; do
+    param="$1"
     case $param in
         #####################################
         # Prefix path
@@ -54,7 +55,13 @@ for param in "$@"; do
         --PROCS=*)
             NP="${param#*=}"
         ;;
-        # Make styled processes
+
+        # Make styled processes with or without space
+       -j)
+           shift
+            NP="${1}"
+       ;;
+
         -j*)
             NP="${param#*j}"
         ;;
@@ -64,7 +71,9 @@ for param in "$@"; do
         -pf=*|--platform=*)
             GIVEN_PLATFORM="${param#*=}"
         ;;
+       
     esac
+    shift
 done
 
 PREFIX_PATH=${PREFIX:-~/apps/candi}

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.