From cfc3ea57ce717ae8fc8aa4b37d340d442301f074 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Fri, 3 Jan 2025 16:14:20 -0600 Subject: [PATCH] Make the shell script launcher work on macOS --- configs/launcher.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/launcher.sh b/configs/launcher.sh index 5df4d41..1bf6afe 100644 --- a/configs/launcher.sh +++ b/configs/launcher.sh @@ -13,9 +13,9 @@ die() { echo "$*" >&2; exit 1; } # Glean operating system. os=$(uname -s 2>/dev/null) case "$os" in - Linux) os=linux ;; - Darwin) os=macos ;; - MINGW*|MSYS*) os=windows ;; + Linux) os=linux; exedir=. ;; + Darwin) os=macos; exedir=Contents/MacOS ;; + MINGW*|MSYS*) os=windows; exedir=. ;; *) die "Unsupported operating system: $os" ;; esac @@ -28,7 +28,7 @@ case "$arch" in esac # Launch with the appropriate executable. -launcher="$dir/$name-$os-$arch" +launcher="$dir/$exedir/$name-$os-$arch" test -e "$launcher" || die "Launcher not available: $launcher" test -x "$launcher" || die "Launcher not executable: $launcher" "$launcher" $@