4
0
Эх сурвалжийг харах

Revert "fix(linuxgsm.sh): bug causing serverlist.csv to keep downloading"

This reverts commit b873a83dc3c97a15ad7cd689c859ae2353b1d153.
Daniel Gibbs 7 жил өмнө
parent
commit
412f56a243
1 өөрчлөгдсөн 9 нэмэгдсэн , 13 устгасан
  1. 9 13
      linuxgsm.sh

+ 9 - 13
linuxgsm.sh

@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="v19.8.3"
+version="v19.8.1"
 shortname="core"
 gameservername="core"
 rootdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
@@ -258,15 +258,6 @@ fn_install_file(){
 	exit
 }
 
-fn_dl_serverlist(){
-	# Download the latest serverlist. This is the complete list of all supported servers.
-	fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
-	if [ ! -f "${serverlist}" ]; then
-		echo "[ FAIL ] serverlist.csv could not be loaded."
-		exit 1
-	fi
-}
-
 # Prevent LinuxGSM from running as root. Except if doing a dependency install.
 if [ "$(whoami)" == "root" ]; then
 	if [ "${userinput}" == "install" ]||[ "${userinput}" == "auto-install" ]||[ "${userinput}" == "i" ]||[ "${userinput}" == "ai" ]; then
@@ -283,16 +274,21 @@ if [ "$(whoami)" == "root" ]; then
 	fi
 fi
 
+# Download the latest serverlist. This is the complete list of all supported servers.
+fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5"
+if [ ! -f "${serverlist}" ]; then
+	echo "[ FAIL ] serverlist.csv could not be loaded."
+	exit 1
+fi
+
 # LinuxGSM installer mode.
 if [ "${shortname}" == "core" ]; then
 	if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then
-		fn_dl_serverlist
 		{
 			tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}'
 		} | column -s $'\t' -t | more
 		exit
 	elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then
-		fn_dl_serverlist
 		tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}"
 		fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}"
 		userinput="${result}"
@@ -382,4 +378,4 @@ else
 		getopt=$1
 		core_getopt.sh
 	fi
-fi
+fi