|
|
@@ -147,7 +147,7 @@ fn_check_steamcmd_exec() {
|
|
|
fn_update_steamcmd_localbuild() {
|
|
|
# Gets local build info.
|
|
|
fn_print_dots "Checking local build: ${remotelocation}"
|
|
|
- fn_appmanifest_check
|
|
|
+ fn_check_steamcmd_appmanifest
|
|
|
# Uses appmanifest to find local build.
|
|
|
localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3)
|
|
|
|
|
|
@@ -174,8 +174,8 @@ fn_update_steamcmd_remotebuild() {
|
|
|
fi
|
|
|
|
|
|
# Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD.
|
|
|
- if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then
|
|
|
- find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \;
|
|
|
+ if [ "$(find "${HOME}" -type f -name "appinfo.vdf" 2> /dev/null | wc -l)" -ne "0" ]; then
|
|
|
+ find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; 2> /dev/null
|
|
|
fi
|
|
|
|
|
|
# password for branch not needed to check the buildid
|
|
|
@@ -281,14 +281,13 @@ fn_update_steamcmd_compare() {
|
|
|
}
|
|
|
|
|
|
fn_appmanifest_info() {
|
|
|
- appmanifestfile=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf")
|
|
|
- appmanifestfilewc=$(find -L "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l)
|
|
|
+ appmanifestfile=$(find -L "${serverfiles}/steamapps" -type f -name "appmanifest_${appid}.acf")
|
|
|
+ appmanifestfilewc=$(find -L "${serverfiles}/steamapps" -type f -name "appmanifest_${appid}.acf" | wc -l)
|
|
|
}
|
|
|
|
|
|
-fn_appmanifest_check() {
|
|
|
+fn_check_steamcmd_appmanifest() {
|
|
|
fn_appmanifest_info
|
|
|
# Multiple or no matching appmanifest files may sometimes be present.
|
|
|
- # This error is corrected if required.
|
|
|
if [ "${appmanifestfilewc}" -ge "2" ]; then
|
|
|
fn_print_error "Multiple appmanifest_${appid}.acf files found"
|
|
|
fn_script_log_error "Multiple appmanifest_${appid}.acf files found"
|
|
|
@@ -327,4 +326,96 @@ fn_appmanifest_check() {
|
|
|
core_exit.sh
|
|
|
fi
|
|
|
fi
|
|
|
+
|
|
|
+ # Checking for half completed updates.
|
|
|
+ bytesdownloaded=$(grep BytesDownloaded "${appmanifestfile}" | tr -cd '[:digit:]')
|
|
|
+ bytestodownload=$(grep BytesToDownload "${appmanifestfile}" | tr -cd '[:digit:]')
|
|
|
+ if [ "${bytesdownloaded}" != "${bytestodownload}" ]; then
|
|
|
+ fn_print_error_nl "BytesDownloaded and BytesToDownload do not match"
|
|
|
+ fn_script_log_error "BytesDownloaded and BytesToDownload do not match"
|
|
|
+ fn_print_info_nl "Forcing update to correct issue"
|
|
|
+ fn_script_log_info "Forcing update to correct issue"
|
|
|
+ fn_dl_steamcmd
|
|
|
+ fi
|
|
|
+
|
|
|
+ bytesstaged=$(grep BytesStaged "${appmanifestfile}" | tr -cd '[:digit:]')
|
|
|
+ bytestostage=$(grep BytesToStage "${appmanifestfile}" | tr -cd '[:digit:]')
|
|
|
+ if [ "${bytesstaged}" != "${bytestostage}" ]; then
|
|
|
+ fn_print_error_nl "BytesStaged and BytesToStage do not match"
|
|
|
+ fn_script_log_error "BytesStaged and BytesToStage do not match"
|
|
|
+ fn_print_info_nl "Forcing update to correct issue"
|
|
|
+ fn_script_log_info "Forcing update to correct issue"
|
|
|
+ fn_dl_steamcmd
|
|
|
+ fi
|
|
|
+
|
|
|
+ # if engine is GoldSrc check SharedDepots exists in appmanifest_90.acf
|
|
|
+ if [ "${engine}" == "goldsrc" ]; then
|
|
|
+ shareddepotsexists=$(grep -c SharedDepots "${serverfiles}/steamapps/appmanifest_90.acf")
|
|
|
+ if [ ! -f "${serverfiles}/steamapps/appmanifest_90.acf" ] || [ "${shareddepotsexists}" == "0" ]; then
|
|
|
+ fn_print_error_nl "SharedDepots missing from appmanifest_${appid}.acf"
|
|
|
+ fn_script_log_error "SharedDepots missing from appmanifest_${appid}.acf"
|
|
|
+ fn_print_info_nl "Forcing update to correct issue"
|
|
|
+ fn_script_log_info "Forcing update to correct issue"
|
|
|
+ if [ "${shortname}" == "ahl" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "bb" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "cscz" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_80.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "css" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "dmc" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_40.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "dod" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_30.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "hldm" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "ns" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "opfor" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_50.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "ricochet" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_60.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "tfc" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_20.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "ts" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ elif [ "${shortname}" == "vs" ]; then
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_90.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_10.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fn_fetch_file_github "lgsm/data/appmanifest/${shortname}" "appmanifest_70.acf" "${serverfiles}/steamapps" "nochmodx" "norun" "noforce" "nohash"
|
|
|
+ fi
|
|
|
+ fn_dl_steamcmd
|
|
|
+ fi
|
|
|
+ fi
|
|
|
}
|