From: Timo Heister Date: Thu, 4 Feb 2016 23:30:51 +0000 (-0500) Subject: handle -j with space X-Git-Tag: v0.8.4~6^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9317c30c71b137b25f9a48b4c47f3652e31711d1;p=candi.git handle -j with space --- diff --git a/candi.sh b/candi.sh index 1d2942d..c8668c7 100755 --- 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}