From b5f15acec41d009dc5e111bc20e260bf55aba3c2 Mon Sep 17 00:00:00 2001 From: yannick-was-taken Date: Thu, 6 Apr 2023 23:06:16 +0200 Subject: [PATCH] check.sh: find Godot 4 executable when available as `godot` --- check.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/check.sh b/check.sh index fb9c859cc..c745a99a6 100755 --- a/check.sh +++ b/check.sh @@ -67,6 +67,16 @@ function findGodot() { echo "Found 'godot4' executable" godotBin="godot4" + elif command -v godot &>/dev/null; then + # Check if `godot` actually is Godot 4.x + if godot --version | grep -qE "^4\\."; then + echo "Found 'godot' executable with version $(godot --version)" + godotBin="godot" + else + echo "Godot executable found, but it is the incompatible version $(godot --version)" + exit 2 + fi + # Special case for Windows when there is a .bat file # Also consider that 'cmd /c' would need 'cmd //c' (https://stackoverflow.com/q/21357813) elif @@ -99,7 +109,7 @@ for arg in "${args[@]}"; do ;; itest) findGodot - + cmds+=("cargo $toolchain build -p itest $extraArgs") cmds+=("$godotBin --path itest/godot --headless") ;;