@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
2020 set -x
2121fi
2222
23- version=" v19.8.1 "
23+ version=" v19.8.3 "
2424shortname=" core"
2525gameservername=" core"
2626rootdir=" $( dirname " $( readlink -f " ${BASH_SOURCE[0]} " ) " ) "
@@ -258,6 +258,15 @@ fn_install_file(){
258258 exit
259259}
260260
261+ fn_dl_serverlist (){
262+ # Download the latest serverlist. This is the complete list of all supported servers.
263+ fn_bootstrap_fetch_file_github " lgsm/data" " serverlist.csv" " ${datadir} " " nochmodx" " norun" " forcedl" " nomd5"
264+ if [ ! -f " ${serverlist} " ]; then
265+ echo " [ FAIL ] serverlist.csv could not be loaded."
266+ exit 1
267+ fi
268+ }
269+
261270# Prevent LinuxGSM from running as root. Except if doing a dependency install.
262271if [ " $( whoami) " == " root" ]; then
263272 if [ " ${userinput} " == " install" ]|| [ " ${userinput} " == " auto-install" ]|| [ " ${userinput} " == " i" ]|| [ " ${userinput} " == " ai" ]; then
@@ -274,21 +283,16 @@ if [ "$(whoami)" == "root" ]; then
274283 fi
275284fi
276285
277- # Download the latest serverlist. This is the complete list of all supported servers.
278- fn_bootstrap_fetch_file_github " lgsm/data" " serverlist.csv" " ${datadir} " " nochmodx" " norun" " forcedl" " nomd5"
279- if [ ! -f " ${serverlist} " ]; then
280- echo " [ FAIL ] serverlist.csv could not be loaded."
281- exit 1
282- fi
283-
284286# LinuxGSM installer mode.
285287if [ " ${shortname} " == " core" ]; then
286288 if [ " ${userinput} " == " list" ]|| [ " ${userinput} " == " l" ]; then
289+ fn_dl_serverlist
287290 {
288291 tail -n +2 " ${serverlist} " | awk -F " ," ' {print $2 "\t" $3}'
289292 } | column -s $' \t ' -t | more
290293 exit
291294 elif [ " ${userinput} " == " install" ]|| [ " ${userinput} " == " i" ]; then
295+ fn_dl_serverlist
292296 tail -n +2 " ${serverlist} " | awk -F " ," ' {print $1 "," $2 "," $3}' > " ${serverlistmenu} "
293297 fn_install_menu result " LinuxGSM" " Select game server to install." " ${serverlistmenu} "
294298 userinput=" ${result} "
0 commit comments