Skip to content

Commit

Permalink
Make the shell script launcher work on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Jan 3, 2025
1 parent 28cfa46 commit cfc3ea5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions configs/launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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" $@

0 comments on commit cfc3ea5

Please sign in to comment.