From 5a4693ac2f9adcb2ab25faaa1ef6a295ee83b124 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Fri, 22 Apr 2016 18:03:24 +0100 Subject: [PATCH] allow overwriting packages list in cmdline --- candi.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.39.5