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

fix(update): redo steamcmd update part for new behavoir (#3139)

Co-authored-by: Daniel Gibbs <me@danielgibbs.co.uk>
Christian 5 лет назад
Родитель
Сommit
452323a72c
1 измененных файлов с 2 добавлено и 7 удалено
  1. 2 7
      lgsm/functions/update_steamcmd.sh

+ 2 - 7
lgsm/functions/update_steamcmd.sh

@@ -40,13 +40,8 @@ fn_update_steamcmd_remotebuild(){
 		find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \;
 	fi
 
-	if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then
-		remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" -beta "${branch}" -betapassword "${betapassword}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]')
-	elif [ -n "${branch}" ]&&[ "${branch}" != "public" ]; then
-		remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" -beta "${branch}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]')
-	else
-		remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]')
-	fi
+	# password for branch not needed to check the buildid
+	remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')
 
 	if [ "${firstcommandname}" != "INSTALL" ]; then
 		fn_print_dots "Checking remote build: ${remotelocation}"