taloria/spielen.sh

19 lines
664 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# Startet das Spiel. Godot liegt auf dieser Maschine nicht im PATH, sondern
# unter /opt/godot — das Skript findet beides.
set -euo pipefail
HIER="$(cd "$(dirname "$0")" && pwd)"
if [ -n "${GODOT:-}" ]; then
:
elif command -v godot >/dev/null 2>&1; then
GODOT="$(command -v godot)"
elif [ -x "/Applications/Godot.app/Contents/MacOS/Godot" ]; then
GODOT="/Applications/Godot.app/Contents/MacOS/Godot"
elif [ -x "/opt/godot/Godot_v4.7.2-stable_linux.x86_64" ]; then
GODOT="/opt/godot/Godot_v4.7.2-stable_linux.x86_64"
else
echo "Godot nicht gefunden. Setze GODOT=/pfad/zu/godot" >&2
exit 1
fi
exec "$GODOT" --path "$HIER/game" "$@"