Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions games/hytale/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,26 @@ set -e

cd /home/container

HYTALE_DOWNLOADER="./hytale-downloader/hytale-downloader-linux"

# If HYTALE_SERVER_SESSION_TOKEN isn't set, assume the user will log in themselves, rather than a host's GSP
if [[ -z "$HYTALE_SERVER_SESSION_TOKEN" ]]; then

echo -e "Checking for Hytale server update..."

if [[ -f version ]]; then
curversion=$(./hytale-downloader/hytale-downloader-linux -patchline "$HYTALE_PATCHLINE" -print-version | tee /dev/tty)
fi
curversion=$($HYTALE_DOWNLOADER -patchline "$HYTALE_PATCHLINE" -print-version | tee /dev/tty)

if ! [[ -e version ]] || [ "$curversion" != "$(cat "version")" ]; then
if [[ -f version ]]; then
echo -e "New update available, downloading version $curversion..."
if [[ "${SKIP_UPDATE}" == "1" ]]; then
echo -e "New update available: $curversion"
else
echo -e "New update available, downloading version: $curversion..."
$HYTALE_DOWNLOADER -patchline "$HYTALE_PATCHLINE" -download-path HytaleServer.zip
Comment thread
WilliamVenner marked this conversation as resolved.
fi

./hytale-downloader/hytale-downloader-linux -patchline "$HYTALE_PATCHLINE" -download-path HytaleServer.zip

# Write the current version if it wasn't set before
if [[ -z "$curversion" ]]; then
curversion=$(./hytale-downloader/hytale-downloader-linux -patchline "$HYTALE_PATCHLINE" -print-version | tee /dev/tty)
curversion=$($HYTALE_DOWNLOADER -patchline "$HYTALE_PATCHLINE" -print-version | tee /dev/tty)
fi

unzip -o HytaleServer.zip -d .
Expand Down