ScuttleBot

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