From 9317c30c71b137b25f9a48b4c47f3652e31711d1 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 4 Feb 2016 18:30:51 -0500 Subject: [PATCH] handle -j with space --- candi.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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} -- 2.39.5