Просмотр исходного кода

Auto stash before cherry pick of "versions before v20.3.0 will not use version tags"

Daniel Gibbs 6 лет назад
Родитель
Сommit
707a546078

+ 1 - 4
lgsm/functions/check_ip.sh

@@ -44,10 +44,7 @@ if [ "${travistest}" != "1" ]; then
 				echo -en "\n"
 				echo -en "Set ip=\"0.0.0.0\" to one of the following:\n"
 				fn_script_log_fatal "Multiple IP addresses found."
-				if [ "${legacymode}" == "1" ]; then
-					fn_script_log_fatal "Specify the IP you want to bind within the ${selfname} script."
-				else
-					fn_script_log_fatal "Specify the IP you want to bind within: ${configdirserver}."
+				fn_script_log_fatal "Specify the IP you want to bind within: ${configdirserver}."
 				fi
 			fi
 			echo -en "${getip}\n"

+ 2 - 10
lgsm/functions/check_steamcmd.sh

@@ -31,18 +31,10 @@ fn_install_steamcmd(){
 fn_check_steamcmd_user(){
 	# Checks if steamuser is setup.
 	if [ "${steamuser}" == "username" ]; then
-		if [ "${legacymode}" == "1" ]; then
-			fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}"
-		else
-			fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}"
-		fi
+		fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}"
 		echo -e "	* Change steamuser=\"username\" to a valid steam login."
 		if [ -d "${lgsmlogdir}" ]; then
-			if [ "${legacymode}" == "1" ]; then
-				fn_script_log_fatal "Steam login not set. Update steamuser in ${selfname}"
-			else
-				fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}"
-			fi
+			fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}"
 		fi
 		core_exit.sh
 	fi

+ 1 - 1
lgsm/functions/core_dl.sh

@@ -237,7 +237,7 @@ fn_fetch_file_github(){
 	github_file_url_dir="${1}"
 	github_file_url_name="${2}"
 
-	if [ "${legacycheckversionfix}" == "1" ]; then
+	if [ "${legacymode}" == "1" ]; then
 		# For legacy versions - code can be removed at a future date
 		remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
 		remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"

+ 7 - 12
lgsm/functions/core_legacy.sh

@@ -7,20 +7,15 @@
 functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # This is to help the transition to v20.3.0 and above
-if [ ! -f "${functionsdir}/check_version.sh" ]; then
-	legacy_versions_array=( v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0 )
-	for legacy_version in "${legacy_versions_array[@]}"
-	do
-		if [ "${version}" == "${legacy_version}" ]; then
-			legacycheckversionfix=1
-			github_file_url_dir="lgsm/functions"
-			fn_fetch_file_github "${github_file_url_dir}" "check_version.sh" "${functionsdir}" "nochmodx" "norun" "noforce" "nomd5"
-		fi
-	done
-fi
+legacy_versions_array=( v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0 )
+for legacy_version in "${legacy_versions_array[@]}"
+do
+	if [ "${version}" == "${legacy_version}" ]; then
+		legacymode=1
+	fi
+done
 
 if [ -z "${serverfiles}" ]; then
-	legacymode=1
 	serverfiles="${filesdir}"
 fi