Initial commit
This commit is contained in:
BIN
scripts/hytale-downloader-linux-amd64
Executable file
BIN
scripts/hytale-downloader-linux-amd64
Executable file
Binary file not shown.
42
scripts/pull_generated_into_src.sh
Executable file
42
scripts/pull_generated_into_src.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
# Pull files from repo/hytale-server/src into vendor/hytale-server/src
|
||||
# Only overrides files that exist in both locations
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
HYTALE_SERVER_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
PROJECT_ROOT="$(dirname "$(dirname "$HYTALE_SERVER_ROOT")")"
|
||||
|
||||
SRC_DIR="$HYTALE_SERVER_ROOT/src"
|
||||
REPO_SRC="$PROJECT_ROOT/repo/hytale-server/src"
|
||||
|
||||
if [ ! -d "$SRC_DIR" ]; then
|
||||
echo "Error: src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$REPO_SRC" ]; then
|
||||
echo "Error: repo/hytale-server/src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
count=0
|
||||
|
||||
# Find all files in src
|
||||
while IFS= read -r -d '' file; do
|
||||
# Get relative path from SRC_DIR
|
||||
rel_path="${file#$SRC_DIR/}"
|
||||
|
||||
# Check if corresponding file exists in repo
|
||||
repo_file="$REPO_SRC/$rel_path"
|
||||
|
||||
if [ -f "$repo_file" ]; then
|
||||
cp "$repo_file" "$file"
|
||||
echo "Updated: $rel_path"
|
||||
count=$((count + 1))
|
||||
fi
|
||||
done < <(find "$SRC_DIR" -type f -print0)
|
||||
|
||||
echo ""
|
||||
echo "Done. Updated $count file(s)."
|
||||
38
scripts/update-server.sh
Executable file
38
scripts/update-server.sh
Executable 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"
|
||||
Reference in New Issue
Block a user