mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-05 21:25:27 +02:00
10e6d39f27
- setup: add --host codex|claude|auto flag, install to ~/.codex/skills/ when targeting Codex, auto-detect installed agents - find-browse: priority chain .codex > .agents > .claude (both workspace-local and global) - dev-setup/teardown: create .agents/skills/gstack symlinks for dev mode Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
814 B
Bash
Executable File
22 lines
814 B
Bash
Executable File
#!/bin/bash
|
|
# Shim: delegates to compiled find-browse binary, falls back to basic discovery.
|
|
# The compiled binary handles git root detection for workspace-local installs.
|
|
DIR="$(cd "$(dirname "$0")/.." && pwd)/dist"
|
|
if test -x "$DIR/find-browse"; then
|
|
exec "$DIR/find-browse" "$@"
|
|
fi
|
|
# Fallback: basic discovery with priority chain
|
|
ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
for MARKER in .codex .agents .claude; do
|
|
if [ -n "$ROOT" ] && test -x "$ROOT/$MARKER/skills/gstack/browse/dist/browse"; then
|
|
echo "$ROOT/$MARKER/skills/gstack/browse/dist/browse"
|
|
exit 0
|
|
fi
|
|
if test -x "$HOME/$MARKER/skills/gstack/browse/dist/browse"; then
|
|
echo "$HOME/$MARKER/skills/gstack/browse/dist/browse"
|
|
exit 0
|
|
fi
|
|
done
|
|
echo "ERROR: browse binary not found. Run: cd <skill-dir> && ./setup" >&2
|
|
exit 1
|