- commit
- b3dc878c776910f5c923817107c8975051f392a8
- parent
- 8c41a5c017d7ce15bb25a34b1de6e224127c27b8
- author
- Dami <dami.etoile@gmail.com>
| M | README.md | 4 | ++-- |
| M | select-mate.sh | 17 | ++++++++++++++++- |
@@ -22,10 +22,10 @@ If you skip `gum`, the game falls back to plain terminal prompts and numbered me
2222 Run the hosted script in one shot:2323 2424 ```bash25-curl -fsSL https://select-mate.sh | bash25+curl -fsSL https://select-mate.sh | sh2626 ```2727 28-The URL should serve the actual released `select-mate.sh` script. When launched this way, the script reattaches to your terminal for prompts, asks for your identity, and then lets you choose between a multiplayer game and a local-only game.28+The URL should serve the actual released `select-mate.sh` script. When launched this way, the script hops into `bash`, reattaches to your terminal for prompts, asks for your identity, and then lets you choose between a multiplayer game and a local-only game.2929 3030 Make sure the script is executable:3131 @@ -1,5 +1,20 @@
11 22 3+if [ -z "${BASH_VERSION:-}" ]; then4+ if command -v bash >/dev/null 2>&1; then5+ case "${0##*/}" in6+ sh|dash|ash)7+ exec bash /dev/fd/0 "$@"8+ ;;9+ *)10+ exec bash "$0" "$@"11+ ;;12+ esac13+ fi14+ printf 'bash is required.\n' >&215+ exit 116+fi17+318 set -euo pipefail419 520 APP_NAME="select-mate"@@ -644,7 +659,7 @@ pick_option() {
644659 fi645660 646661 if has_gum; then647- printf '%s\n' "${options[@]}" | gum_choose_interactive --header "$header"662+ gum_choose_interactive --header "$header" "${options[@]}"648663 return 0649664 fi650665