Skip to content

Instantly share code, notes, and snippets.

@bscott
Last active June 15, 2026 23:54
Show Gist options
  • Select an option

  • Save bscott/dee4fe304721ce2afadb8b156aab2997 to your computer and use it in GitHub Desktop.

Select an option

Save bscott/dee4fe304721ce2afadb8b156aab2997 to your computer and use it in GitHub Desktop.
Play Riftbourne on MacOS
#!/usr/bin/env bash
# Play Riftborne (linux-x64 build) on macOS via a Linux container.
# Place this script in the RiftBourne directory. Recommend using with the Itch.io Build: https://itch.io/profile/riftborne
# Prefers Apple's native `container` tool, falls back to Docker Desktop.
# Saves persist in ./userdata next to this script.
set -euo pipefail
GAME_DIR="$(cd "$(dirname "$0")" && pwd)"
USERDATA="$GAME_DIR/userdata"
mkdir -p "$USERDATA"
IMAGE="mcr.microsoft.com/dotnet/runtime-deps:10.0"
RUN_ARGS=(--rm -i -t --platform linux/amd64
-e TERM="${TERM:-xterm-256color}"
-v "$GAME_DIR":/game
-v "$USERDATA":/root/.local/share/Riftborne
-w /game
"$IMAGE" ./Riftborne)
if command -v container >/dev/null 2>&1 && container system status >/dev/null 2>&1; then
exec container run "${RUN_ARGS[@]}"
elif command -v docker >/dev/null 2>&1; then
exec docker run "${RUN_ARGS[@]}"
elif [ -x /Applications/Docker.app/Contents/Resources/bin/docker ]; then
exec /Applications/Docker.app/Contents/Resources/bin/docker run "${RUN_ARGS[@]}"
else
echo "No container runtime found. Install Apple container (brew install container; container system start) or Docker Desktop." >&2
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment