diff options
author | Dennis Herbrich | 2022-05-26 19:31:23 +0200 |
---|---|---|
committer | Dennis Herbrich | 2022-05-26 19:31:23 +0200 |
commit | bc6b291fce546d518cb3d84583cef446eea1df45 (patch) | |
tree | 7a2840346ae5fdd517c89f489c4df64eb95a2d45 | |
parent | da2d6be346da499b30ff1a0c9b21e610ccc0ce0b (diff) | |
download | aur-bc6b291fce546d518cb3d84583cef446eea1df45.tar.gz |
refactor(package): prepare for more architectures
Properly handle the case of building for an unsupported architecture by
exiting with an error instead of silently installing i686 binaries.
-rw-r--r-- | PKGBUILD | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -63,9 +63,14 @@ package() { if [[ "$CARCH" == "x86_64" ]]; then install -Dm755 "${srcdir}/sunvox/sunvox/linux_x86_64/sunvox" "${pkgdir}/usr/bin/sunvox" install -Dm755 "${srcdir}/sunvox/sunvox/linux_x86_64/sunvox_opengl" "${pkgdir}/usr/bin/sunvox_opengl" - else + elif [[ "$CARCH" == "i686" ]]; then install -Dm755 "${srcdir}/sunvox/sunvox/linux_x86/sunvox" "${pkgdir}/usr/bin/sunvox" install -Dm755 "${srcdir}/sunvox/sunvox/linux_x86/sunvox_lofi" "${pkgdir}/usr/bin/sunvox_lofi" + else + printf -v _archlist -- "%s, " "${arch[@]}" + printf -- ":: error: unsupported architecture '%s', must be one of " "${CARCH}" + printf -- "%s\n" "${_archlist%, }" + exit 2 fi # preserve distributed structure of source package to install all |