From: Timo Heister Date: Fri, 22 Apr 2016 17:03:24 +0000 (+0100) Subject: allow overwriting packages list in cmdline X-Git-Tag: v0.8.5~39^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a4693ac2f9adcb2ab25faaa1ef6a295ee83b124;p=candi.git allow overwriting packages list in cmdline --- diff --git a/candi.sh b/candi.sh index 3bce263..f9475fa 100755 --- a/candi.sh +++ b/candi.sh @@ -41,6 +41,7 @@ TIC_GLOBAL="$(${DATE_CMD} +%s%N)" # Parse command line input parameters PREFIX=~/deal.ii-candi PROCS=1 +CMD_PACKAGES="" while [ -n "$1" ]; do param="$1" @@ -54,6 +55,7 @@ while [ -n "$1" ]; do echo " -p , --prefix= set a different prefix path (default $PREFIX)" echo " -j , -j, --PROCS= compile with N processes in parallel (default $PROCS)" echo " --platform= force usage of a particular platform file" + echo " --packages=\"pkg1 pkg2\" install the given list of packages instead of the default set in candi.cfg" echo "" echo "The configuration including the choice of packages to install is stored in candi.cfg, see README.md for more information." exit 0 @@ -70,6 +72,12 @@ while [ -n "$1" ]; do # replace '~' by $HOME PREFIX=${PREFIX/#~\//$HOME\/} ;; + + ##################################### + # overwrite package list + --packages=*) + CMD_PACKAGES="${param#*=}" + ;; ##################################### # Number of maximum processes to use @@ -638,6 +646,10 @@ default DEVELOPER_MODE=OFF default PACKAGES_OFF="" +if [ -n "$CMD_PACKAGES" ]; then + PACKAGES=$CMD_PACKAGES +fi + ################################################################################ # Check if project was specified correctly if [ -d ${PROJECT} ]; then