mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: aur build
This commit is contained in:
parent
a9c56b813a
commit
40ac2549ff
1 changed files with 6 additions and 6 deletions
|
|
@ -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"',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue