Skip to content

Commit 40ac254

Browse files
committed
fix: aur build
1 parent a9c56b8 commit 40ac254

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

packages/opencode/script/publish.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ if (!Script.preview) {
132132
"package() {",
133133
` cd "opencode-\${pkgver}/packages/opencode"`,
134134
' mkdir -p "${pkgdir}/usr/bin"',
135-
' arch="x64"',
135+
' target_arch="x64"',
136136
' case "$CARCH" in',
137-
' x86_64) arch="x64" ;;',
138-
' aarch64) arch="arm64" ;;',
137+
' x86_64) target_arch="x64" ;;',
138+
' aarch64) target_arch="arm64" ;;',
139139
' *) printf "unsupported architecture: %s\\n" "$CARCH" >&2 ; return 1 ;;',
140140
" esac",
141141
' libc=""',
@@ -148,14 +148,14 @@ if (!Script.preview) {
148148
' libc="-musl"',
149149
" fi",
150150
' base=""',
151-
' if [ "$arch" = "x64" ]; then',
151+
' if [ "$target_arch" = "x64" ]; then',
152152
" if ! grep -qi avx2 /proc/cpuinfo 2>/dev/null; then",
153153
' base="-baseline"',
154154
" fi",
155155
" fi",
156-
' bin="dist/opencode-linux-${arch}${base}${libc}/bin/opencode"',
156+
' bin="dist/opencode-linux-${target_arch}${base}${libc}/bin/opencode"',
157157
' if [ ! -f "$bin" ]; then',
158-
' printf "unable to find binary for %s%s%s\\n" "$arch" "$base" "$libc" >&2',
158+
' printf "unable to find binary for %s%s%s\\n" "$target_arch" "$base" "$libc" >&2',
159159
" return 1",
160160
" fi",
161161
' install -Dm755 "$bin" "${pkgdir}/usr/bin/opencode"',

0 commit comments

Comments
 (0)