ScuttleBot

scuttlebot / skills / gemini-relay / scripts / gemini-relay.sh
Source Blame History 18 lines
016a29f… lmata 1 #!/usr/bin/env bash
016a29f… lmata 2 # Development wrapper for the compiled Gemini relay broker.
016a29f… lmata 3
016a29f… lmata 4 set -euo pipefail
016a29f… lmata 5
016a29f… lmata 6 SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
016a29f… lmata 7 REPO_ROOT=$(CDPATH= cd -- "$SCRIPT_DIR/../../.." && pwd)
016a29f… lmata 8
016a29f… lmata 9 if [ -x "$REPO_ROOT/bin/gemini-relay" ]; then
016a29f… lmata 10 exec "$REPO_ROOT/bin/gemini-relay" "$@"
016a29f… lmata 11 fi
016a29f… lmata 12
016a29f… lmata 13 if ! command -v go >/dev/null 2>&1; then
016a29f… lmata 14 printf 'gemini-relay: go is required to run the broker from the repo checkout\n' >&2
016a29f… lmata 15 exit 1
016a29f… lmata 16 fi
016a29f… lmata 17
016a29f… lmata 18 exec go run "$REPO_ROOT/cmd/gemini-relay" "$@"

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button