-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup.sh
executable file
·51 lines (45 loc) · 986 Bytes
/
startup.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/bash
# setup colors
b=$(tput bold)
r=$(tput rev)
R=$(tput setaf 1)
Y=$(tput setaf 3)
N=$(tput sgr0)
if [ "$1" == "bare" ]; then
shift
echo "${Y}Executing bare bash with arguments${N}: $@"
exec "bash" "$@"
fi
cd /home/saluser
source .criopy_setup.sh
if [ "$#" -eq 0 ]; then
echo """
${R}No parameter specified, dropping you to a shell.${N} Supported docker run parameters:
${b}bare${N} - run bare container, don't source SAL/DDS setup files, don't setup environment
${b}SSGUI${N} - run M1M3 Support System GUI
${b}TSGUI${N} - run M1M3 Thermal System GUI
${b}VMSGUI${N} - run VMS GUI
${b}VMSlogger${N} - run VMSlogger. Pass provided arguments to logger call.
"""
exec "bash"
fi
par=$(echo $1 | tr [:lower:] [:upper:])
shift
case $par in
SSGUI)
M1M3GUI
;;
TSGUI)
M1M3TSGUI
;;
VMSGUI)
VMSGUI
;;
VMSLOGGER)
VMSlogger $*
;;
*)
echo "${Y}Unknown argument $par, executing shell${N}"
exec "bash"
;;
esac