mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-24 16:47:58 +02:00
f5bf857cee
- add options to overwrite installation root and configuration file
40 lines
571 B
Bash
Executable File
40 lines
571 B
Bash
Executable File
#!/bin/bash
|
|
|
|
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
|
|
|