#!/usr/bin/env bash set -euo pipefail # Creates a disposable, local Hytale 0.5.9 server beside the repository. It # never writes to the launcher installation or the project's tracked files. project_root="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd -P)" runtime_root="${PROJECT_CAPTURE_DEV_SERVER:-$(CDPATH= cd -- "${project_root}/.." && pwd -P)/ProjectCapture-devserver}" launcher_root="/Users/christianschindler/Library/Application Support/Hytale/install/release/package/game/latest" server_source="${launcher_root}/Server/HytaleServer.jar" assets_source="${launcher_root}/Assets.zip" for source_path in "${server_source}" "${assets_source}"; do [[ -f "${source_path}" && ! -L "${source_path}" ]] || { printf 'Fehlende oder unsichere Hytale-Quelldatei: %s\n' "${source_path}" >&2 exit 1 } done [[ ! -e "${runtime_root}" && ! -L "${runtime_root}" ]] || { printf 'Ziel existiert bereits; nichts wurde überschrieben: %s\n' "${runtime_root}" >&2 exit 1 } mkdir -p "${runtime_root}/Server" "${runtime_root}/mods" "${runtime_root}/universe" cp -- "${server_source}" "${runtime_root}/Server/HytaleServer.jar" cp -- "${assets_source}" "${runtime_root}/Assets.zip" printf 'Isolierte Hytale-0.5.9-Runtime angelegt: %s\n' "${runtime_root}"