diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.ts index 5277744ad..1cc07d389 100755 --- a/packages/opencode/script/publish.ts +++ b/packages/opencode/script/publish.ts @@ -132,10 +132,10 @@ if (!Script.preview) { "package() {", ` cd "opencode-\${pkgver}/packages/opencode"`, ' mkdir -p "${pkgdir}/usr/bin"', - ' arch="x64"', + ' target_arch="x64"', ' case "$CARCH" in', - ' x86_64) arch="x64" ;;', - ' aarch64) arch="arm64" ;;', + ' x86_64) target_arch="x64" ;;', + ' aarch64) target_arch="arm64" ;;', ' *) printf "unsupported architecture: %s\\n" "$CARCH" >&2 ; return 1 ;;', " esac", ' libc=""', @@ -148,14 +148,14 @@ if (!Script.preview) { ' libc="-musl"', " fi", ' base=""', - ' if [ "$arch" = "x64" ]; then', + ' if [ "$target_arch" = "x64" ]; then', " if ! grep -qi avx2 /proc/cpuinfo 2>/dev/null; then", ' base="-baseline"', " fi", " fi", - ' bin="dist/opencode-linux-${arch}${base}${libc}/bin/opencode"', + ' bin="dist/opencode-linux-${target_arch}${base}${libc}/bin/opencode"', ' if [ ! -f "$bin" ]; then', - ' printf "unable to find binary for %s%s%s\\n" "$arch" "$base" "$libc" >&2', + ' printf "unable to find binary for %s%s%s\\n" "$target_arch" "$base" "$libc" >&2', " return 1", " fi", ' install -Dm755 "$bin" "${pkgdir}/usr/bin/opencode"',