mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-07-09 23:30:48 +02:00
bootstrap:
- add options to overwrite installation root and configuration file
This commit is contained in:
+36
-3
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user