# Description: The open source coding agent # URL: https://github.com/anomalyco/opencode # Maintainer: Erich Eckner, crux at eckner dot net # Depends on: icu name=opencode version=1.17.7 release=1 source=("https://github.com/anomalyco/opencode/archive/refs/tags/v${version}.tar.gz") build() { cd "$SRC/${name}-${version}" bun install --frozen-lockfile --ignore-scripts cd packages/opencode OPENCODE_VERSION=$version bun run ./script/build.ts --single --baseline --skip-install install -vDm755 -t "$PKG/usr/bin" "dist/opencode-linux-x64-baseline/bin/opencode" SHELL=/bin/bash "$PKG/usr/bin/opencode" completion \ | install -vDm644 /dev/stdin "$PKG/usr/share/bash-completion/completions/opencode" }