Skip to content

Commit cb698a9

Browse files
Add support for custom beta flags.
1 parent b44e89c commit cb698a9

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

run.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,22 @@ if [[ "${SKIPUPDATE,,}" != "false" ]] && [ ! -f "/config/gamefiles/FactoryServer
107107
fi
108108

109109
if [[ "${SKIPUPDATE,,}" != "true" ]]; then
110-
if [[ "${STEAMBETA,,}" == "true" ]]; then
110+
if [[ -n "${STEAMBETAID}" ]]; then
111+
printf "STEAMBETAID is set. Using beta ID: %s\\n" "$STEAMBETAID"
112+
STEAMBETAFLAG="$STEAMBETAID"
113+
if [[ -n "${STEAMBETAKEY}" ]]; then
114+
BETAPASSWORD="-betapassword $STEAMBETAKEY"
115+
printf "Beta password provided\\n"
116+
else
117+
BETAPASSWORD=""
118+
fi
119+
elif [[ "${STEAMBETA,,}" == "true" ]]; then
111120
printf "Experimental flag is set. Experimental will be downloaded instead of Early Access.\\n"
112121
STEAMBETAFLAG="experimental"
122+
BETAPASSWORD=""
113123
else
114124
STEAMBETAFLAG="public"
125+
BETAPASSWORD=""
115126
fi
116127

117128
STORAGEAVAILABLE=$(stat -f -c "%a*%S" .)
@@ -127,7 +138,7 @@ if [[ "${SKIPUPDATE,,}" != "true" ]]; then
127138
printf "\\nRemoving the app manifest to force Steam to check for an update...\\n"
128139
rm "/config/gamefiles/steamapps/appmanifest_1690800.acf" || true
129140
fi
130-
steamcmd +force_install_dir /config/gamefiles +login anonymous +app_update "$STEAMAPPID" -beta "$STEAMBETAFLAG" validate +quit
141+
steamcmd +force_install_dir /config/gamefiles +login anonymous +app_update "$STEAMAPPID" -beta "$STEAMBETAFLAG" $BETAPASSWORD validate +quit
131142
cp -r /home/steam/.steam/steam/logs/* "/config/logs/steam" || printf "Failed to store Steam logs\\n"
132143
else
133144
printf "Skipping update as flag is set\\n"
@@ -159,4 +170,4 @@ shutdown() {
159170
}
160171
trap shutdown SIGINT SIGTERM
161172

162-
wait
173+
wait

0 commit comments

Comments
 (0)