ScuttleBot

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

Keyboard Shortcuts

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