-
Notifications
You must be signed in to change notification settings - Fork 0
/
entrypoint.sh
36 lines (30 loc) · 904 Bytes
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
RED='\033[0;31m'
CLS='\033[0m'
DEFAULT_OPTIONS=("--nssFlags:\"-lowkey\"" "--userName:\"nasher\"" "--packUnchanged true" "--abortOnCompileError true")
while [[ $# -gt 0 ]]; do
case $1 in
-option)
ADDITIONAL_OPTIONS+="$2"
shift
shift
;;
-usenwnscriptcomp)
DEFAULT_OPTIONS=("--nssFlags:\"-yc\"" "--nssCompiler:/root/.nimble/bin/nwn_script_comp" "--userName:\"nasher\"" "--packUnchanged true" "--abortOnCompileError true")
shift
;;
*)
NASHER_COMMANDS+=("$1")
shift
;;
esac
done
for OPTION in "${DEFAULT_OPTIONS[@]}"; do
echo -e " ${RED}Setting base config:${CLS} nasher config ${OPTION}"
nasher config "${OPTION}"
done
for OPTION in "${ADDITIONAL_OPTIONS[@]}"; do
echo -e " ${RED}Applying config override:${CLS} nasher config ${OPTION}"
nasher config "${OPTION}"
done
nasher "${NASHER_COMMANDS[@]}"