This commit is contained in:
2023-11-20 20:46:46 -06:00
parent ddcfe9e2a3
commit b273607052

View File

@@ -66,7 +66,7 @@ fi
# 05. Begin functions # 05. Begin functions
# =================================================== # ===================================================
update_server() { update_server() {
msg "-------- UPDATING DAYZ SERVER -------------------" msg "============== UPDATING DAYZ SERVER ================="
steamcmd -tcp \ steamcmd -tcp \
+force_install_dir "$LOCAL_STOCK_SERVER" \ +force_install_dir "$LOCAL_STOCK_SERVER" \
+@sSteamCmdForcePlatformType windows \ +@sSteamCmdForcePlatformType windows \
@@ -77,11 +77,11 @@ update_server() {
is_network_drive_mounted && is_network_drive_mounted &&
do_sync "$LOCAL_STOCK_SERVER"/ "$REMOTE_STOCK_SERVER" do_sync "$LOCAL_STOCK_SERVER"/ "$REMOTE_STOCK_SERVER"
msg "-------- DONE UPDATING SERVER -------------------" msg "============ DONE UPDATING SERVER ====================="
} }
update_game() { update_game() {
msg "-------- UPDATING DAYZ GAME -------------------" msg "========== UPDATING DAYZ GAME ================"
steamcmd -tcp \ steamcmd -tcp \
+force_install_dir "$LOCAL_STOCK_GAME" \ +force_install_dir "$LOCAL_STOCK_GAME" \
+@sSteamCmdForcePlatformType windows \ +@sSteamCmdForcePlatformType windows \
@@ -92,11 +92,13 @@ update_game() {
is_network_drive_mounted && is_network_drive_mounted &&
do_sync "$LOCAL_STOCK_GAME"/ "$REMOTE_STOCK_GAME" do_sync "$LOCAL_STOCK_GAME"/ "$REMOTE_STOCK_GAME"
msg "-------- DONE UPDATING GAME -------------------" msg "============= DONE UPDATING GAME ==================="
} }
# args: $1 = server_modlist.txt to update # args: $1 = server_modlist.txt to update
update_mods_for_server() { update_mods_for_server() {
msg "======= UPDATING MODS FOR $1 ========"
mods_file="$MODLISTS/$1" mods_file="$MODLISTS/$1"
map_name=${1%.txt} map_name=${1%.txt}
mkdir -p "$REMOTE_MODS/$map_name" mkdir -p "$REMOTE_MODS/$map_name"
@@ -136,7 +138,6 @@ update_mods_for_server() {
done <"$mods_file" done <"$mods_file"
unset mod unset mod
msg "----------- DOWNLOADING MODS -------------"
# shellcheck disable=2046 # shellcheck disable=2046
steamcmd \ steamcmd \
-tcp \ -tcp \
@@ -180,6 +181,8 @@ update_mods_for_server() {
rm -f "$tempfile" 2>/dev/null ||: rm -f "$tempfile" 2>/dev/null ||:
unset tempfile mod map_name mods_file mods_to_copy mod_name mod_id unset tempfile mod map_name mods_file mods_to_copy mod_name mod_id
msg "======= DONE UPDATING MODS FOR $1 ========"
} }
main() { main() {