build: replace upstream team-list dependency, add neuron launcher preferring compiled binary
This commit is contained in:
@@ -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" "$@"
|
||||
|
||||
Reference in New Issue
Block a user