23 lines
676 B
Bash
23 lines
676 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||
|
|
PROJECT_DIR="$REPO_ROOT/rinkplanner"
|
||
|
|
GODOT="${GODOT:-/opt/godot/Godot_v4.7.2-stable_linux.x86_64}"
|
||
|
|
|
||
|
|
if [[ ! -x "$GODOT" && -x "/Applications/Godot.app/Contents/MacOS/Godot" ]]; then
|
||
|
|
GODOT="/Applications/Godot.app/Contents/MacOS/Godot"
|
||
|
|
fi
|
||
|
|
|
||
|
|
if [[ ! -x "$GODOT" ]]; then
|
||
|
|
echo "Godot binary not found: $GODOT" >&2
|
||
|
|
echo "Set GODOT=/path/to/godot" >&2
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
# Import first so global class names are registered.
|
||
|
|
"$GODOT" --headless --path "$PROJECT_DIR" --import >/dev/null 2>&1 || true
|
||
|
|
|
||
|
|
"$GODOT" --headless --path "$PROJECT_DIR" \
|
||
|
|
--script res://tests/check_rules.gd
|