mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-01 21:30:21 +00:00
Fixes #1801 - chmod 600 on gh hosts.yml after token login Fixes #1798 - remove 2>&1 from bun install curl across agent scripts Agent: security-auditor Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
19 lines
656 B
Bash
Executable file
19 lines
656 B
Bash
Executable file
#!/bin/bash
|
|
set -eo pipefail
|
|
|
|
_ensure_bun() {
|
|
if command -v bun &>/dev/null; then return 0; fi
|
|
curl -fsSL --show-error https://bun.sh/install | bash >/dev/null
|
|
export PATH="$HOME/.bun/bin:$PATH"
|
|
}
|
|
_ensure_bun
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
|
|
if [[ -n "$SCRIPT_DIR" && -f "$SCRIPT_DIR/../cli/src/hetzner/main.ts" ]]; then
|
|
exec bun run "$SCRIPT_DIR/../cli/src/hetzner/main.ts" opencode "$@"
|
|
fi
|
|
|
|
HETZNER_JS=$(mktemp)
|
|
trap 'rm -f "$HETZNER_JS"' EXIT
|
|
curl -fsSL "https://github.com/OpenRouterTeam/spawn/releases/download/hetzner-latest/hetzner.js" -o "$HETZNER_JS"
|
|
exec bun run "$HETZNER_JS" opencode "$@"
|