bootstrap:

- add options to overwrite installation root and configuration file
This commit is contained in:
2017-05-17 12:56:22 +02:00
parent 1d4b3de94c
commit f5bf857cee
3 changed files with 78 additions and 4 deletions
+36 -3
View File
@@ -1,6 +1,39 @@
#!/bin/bash
declare -r BASE_DIR=$(cd "$(dirname $0)" && pwd)
${BASE_DIR}/compile_pmodules.sh || exit 1
${BASE_DIR}/install_pmodules.sh || exit 1
declare -a opts=()
while (( $# > 0 )); do
case $1 in
--debug )
opts+=( "$1" )
;;
--config )
opts+=( "$1=$2" )
shift 1
;;
--config=* )
opts+=( "$1" )
;;
--install-root )
opts+=( "$1=$2" )
shift 1
;;
--install-root=* )
opts+=( "$1" )
;;
-f | --force )
opts+=( "$1" )
;;
-* )
std::die 1 "$1: illegal option"
;;
* )
std::die 1 "No arguments are allowed."
;;
esac
shift 1
done
${BASE_DIR}/compile_pmodules.sh "${opts[@]}" || exit 1
${BASE_DIR}/install_pmodules.sh "${opts[@]}" || exit 1