# If GoldSrc (appid 90) servers. GoldSrc (appid 90) require extra commands.
if["${appid}"=="90"];then
# If using a specific branch.
if[ -n "${branch}"];then
${unbuffer}${steamcmdcommand} +login "${steamuser}""${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}""${branch}" +app_update "${appid}" -beta "${branch}"${validate} +quit | tee -a "${lgsmlog}""${steamcmdlog}"
else
${unbuffer}${steamcmdcommand} +login "${steamuser}""${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}""${branch}" +app_update "${appid}"${validate} +quit | tee -a "${lgsmlog}""${steamcmdlog}"
fi
# Force Windows Platform type.
elif["${shortname}"=="ac"];then
if[ -n "${branch}"];then
${unbuffer}${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}""${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}"${validate} +quit | tee -a "${lgsmlog}""${steamcmdlog}"
else
${unbuffer}${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}""${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}"${validate} +quit | tee -a "${lgsmlog}""${steamcmdlog}"
fi
# All other servers.
else
if[ -n "${branch}"];then
${unbuffer}${steamcmdcommand} +login "${steamuser}""${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}"${validate} +quit | tee -a "${lgsmlog}""${steamcmdlog}"
else
${unbuffer}${steamcmdcommand} +login "${steamuser}""${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}"${validate} +quit | tee -a "${lgsmlog}""${steamcmdlog}"
fi
fi
# Error checking for SteamCMD. Some errors will loop to try again and some will just exit.