-
Notifications
You must be signed in to change notification settings - Fork 12
/
run_server.sh
executable file
·71 lines (59 loc) · 1.44 KB
/
run_server.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# Info
GAME_NAME="Serious Sam Classic"
# Directory
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Initialization
cd "${CURRENT_DIR}"
# Actions
run_option1() {
echo "Running ${option1}"
cd "./SamTFE/Bin"
export LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
"./DedicatedServer" "DefaultCoop"
}
run_option2() {
echo "Running ${option3}"
cd "./SamTSE/Bin"
export LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
"./DedicatedServer" "DefaultCoop"
}
run_option3() {
echo "Running ${option5}"
"nano" "${CURRENT_DIR}/SamTFE/Scripts/Dedicated/DefaultCoop/init.ini"
}
run_option4() {
echo "Running ${option7}"
"nano" "${CURRENT_DIR}/SamTSE/Scripts/Dedicated/DefaultCoop/init.ini"
}
# Launcher
echo "Running ${GAME_NAME} launcher"
option1="Serious Sam TFE Classic (Start Dedicated Server)"
option2="Serious Sam TSE Classic (Start Dedicated Server)"
option3="Serious Sam TFE Classic (Edit Server Settings)"
option4="Serious Sam TSE Classic (Edit Server Settings)"
window_title="${GAME_NAME} Launcher"
LAUNCHER=$(zenity --width 450 --height 300 --list \
--title "${window_title}" \
--text="Launch:" \
--column=" " \
"${option1}" \
"${option2}" \
"${option3}" \
"${option4}"
)
if [ "${LAUNCHER}" == "${option1}" ]
then
run_option1
elif [ "${LAUNCHER}" == "${option2}" ]
then
run_option2
elif [ "${LAUNCHER}" == "${option3}" ]
then
run_option3
elif [ "${LAUNCHER}" == "${option4}" ]
then
run_option4
else
exit 0
fi