Initial commit

This commit is contained in:
luk
2026-01-25 21:02:19 +00:00
commit 0ad4b55303
43 changed files with 19721 additions and 0 deletions

38
scripts/update-server.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HYTALE_SERVER_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
PROJECT_ROOT="$(cd "$HYTALE_SERVER_ROOT/../.." && pwd)"
DOWNLOADER="$SCRIPT_DIR/hytale-downloader-linux-amd64"
OUTPUT_DIR="$PROJECT_ROOT/repo/hytale-server"
if [ ! -f "$DOWNLOADER" ]; then
echo "Error: Downloader not found at $DOWNLOADER"
exit 1
fi
echo "[update-server] Creating output directory..."
mkdir -p "$OUTPUT_DIR"
echo "[update-server] Downloading Hytale server files..."
cd "$SCRIPT_DIR"
"$DOWNLOADER" -download-path "$OUTPUT_DIR/game.zip"
echo "[update-server] Extracting server files..."
unzip -o -q "$OUTPUT_DIR/game.zip" -d "$OUTPUT_DIR"
rm -f "$OUTPUT_DIR/game.zip"
echo "[update-server] Verifying server files..."
if [ ! -f "$OUTPUT_DIR/Server/HytaleServer.jar" ]; then
echo "Error: HytaleServer.jar not found"
exit 1
fi
if [ ! -f "$OUTPUT_DIR/Assets.zip" ]; then
echo "Error: Assets.zip not found"
exit 1
fi
echo "[update-server] Server update completed successfully"
echo "[update-server] Files located at: $OUTPUT_DIR"