]> https://gitweb.dealii.org/ - candi.git/commitdiff
allow overwriting packages list in cmdline 3/head
authorTimo Heister <timo.heister@gmail.com>
Fri, 22 Apr 2016 17:03:24 +0000 (18:03 +0100)
committerTimo Heister <timo.heister@gmail.com>
Fri, 22 Apr 2016 17:03:24 +0000 (18:03 +0100)
candi.sh

index 3bce2630462867dd95f94d9d30c1a243cd1b1f26..f9475fa2c757b437c21396c7d8614c1565230a6e 100755 (executable)
--- 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 <path>, --prefix=<path>  set a different prefix path (default $PREFIX)"
            echo "  -j <N>, -j<N>, --PROCS=<N>  compile with N processes in parallel (default $PROCS)"
            echo "  --platform=<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

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.