build: replace upstream team-list dependency, add neuron launcher preferring compiled binary

This commit is contained in:
2026-08-21 15:11:13 -05:00
parent e30d80389c
commit 746a9bd2df
3 changed files with 15 additions and 47 deletions
+13 -2
View File
@@ -1,5 +1,6 @@
#!/bin/sh
# Neuron launcher: run the CLI from source under Bun.
# Neuron launcher: prefer the compiled binary from a local build,
# fall back to running from source under Bun.
SELF="$0"
while [ -L "$SELF" ]; do
LINK="$(readlink "$SELF")"
@@ -9,4 +10,14 @@ while [ -L "$SELF" ]; do
esac
done
DIR="$(cd "$(dirname "$SELF")" && pwd)"
exec bun run --conditions=browser "$DIR/../src/index.ts" "$@"
PKG="$DIR/.."
ARCH=$(uname -m)
case "$ARCH" in
arm64) TARGET="opencode-darwin-arm64" ;;
x86_64) TARGET="opencode-darwin-x64" ;;
*) TARGET="" ;;
esac
if [ -n "$TARGET" ] && [ -x "$PKG/dist/$TARGET/bin/opencode" ]; then
exec "$PKG/dist/$TARGET/bin/opencode" "$@"
fi
exec bun run --conditions=browser "$PKG/src/index.ts" "$@"