Skip to content

Commit

Permalink
fix(update): fix broken branch selection. (#3130)
Browse files Browse the repository at this point in the history
This change fixes the update command for those on public branches. 
add fix to core_dl.sh
  • Loading branch information
dgibbs64 committed Dec 18, 2020
1 parent 22a76ce commit 67e08ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lgsm/functions/core_dl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn_dl_steamcmd(){
# If using a specific branch.
if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
elif [ -n "${branch}" ]; then
elif [ -n "${branch}" ]&&[ "${branch}" != "public" ]; then
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
else
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
Expand All @@ -70,7 +70,7 @@ fn_dl_steamcmd(){
elif [ "${shortname}" == "ac" ]||[ "${shortname}" == "jk2" ]; then
if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then
${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
elif [ -n "${branch}" ]; then
elif [ -n "${branch}" ]&&[ "${branch}" != "public" ]; then
${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
else
${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
Expand All @@ -79,7 +79,7 @@ fn_dl_steamcmd(){
else
if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
elif [ -n "${branch}" ]; then
elif [ -n "${branch}" ]&&[ "${branch}" != "public" ]; then
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
else
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}"
Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/update_steamcmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn_update_steamcmd_remotebuild(){

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}" ]; then
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:]')
Expand Down

0 comments on commit 67e08ba

Please sign in to comment.