Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib/build
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2023-10-17 23:23:36 +0200
committerLevente Polyak <anthraxx@archlinux.org>2023-10-17 23:23:36 +0200
commite0ab20d05c7cf1807194d40b222970700f9f92fc (patch)
tree0859a1ab1ea9c9038c710af966d66f38f51d99e5 /src/lib/build
parent5cbe9ad61296c91251299bcb0f32aa2e0b3dd5ea (diff)
fix(build): use correct variable to reference available architectures
The referenced places were missing in a previous refactoring commit and hence broke the build command in multiple ways. Fixes 0669315821ea0af00fcc2c6271eb474174173e0a
Diffstat (limited to 'src/lib/build')
-rw-r--r--src/lib/build/build.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/build/build.sh b/src/lib/build/build.sh
index bf6339a..455f38a 100644
--- a/src/lib/build/build.sh
+++ b/src/lib/build/build.sh
@@ -146,11 +146,11 @@ pkgctl_build() {
--arch)
(( $# <= 1 )) && die "missing argument for %s" "$1"
if [[ ${2} == all ]]; then
- BUILD_ARCH=("${_arch[@]::${#_arch[@]}-1}")
+ BUILD_ARCH=("${DEVTOOLS_VALID_ARCHES[@]::${#DEVTOOLS_VALID_ARCHES[@]}-1}")
elif [[ ${2} == any ]]; then
- BUILD_ARCH=("${_arch[0]}")
+ BUILD_ARCH=("${DEVTOOLS_VALID_ARCHES[0]}")
elif ! in_array "${2}" "${BUILD_ARCH[@]}"; then
- if ! in_array "${2}" "${_arch[@]}"; then
+ if ! in_array "${2}" "${DEVTOOLS_VALID_ARCHES[@]}"; then
die 'invalid architecture: %s' "${2}"
fi
BUILD_ARCH+=("${2}")
@@ -320,10 +320,10 @@ pkgctl_build() {
BUILD_ARCH=("")
elif (( ${#BUILD_ARCH[@]} == 0 )); then
if in_array any "${arch[@]}"; then
- BUILD_ARCH=("${_arch[0]}")
+ BUILD_ARCH=("${DEVTOOLS_VALID_ARCHES[0]}")
else
for _arch in "${arch[@]}"; do
- if in_array "${_arch}" "${_arch[@]}"; then
+ if in_array "${_arch}" "${DEVTOOLS_VALID_ARCHES[@]}"; then
BUILD_ARCH+=("$_arch")
else
warning 'invalid architecture, not building for: %s' "${_arch}"