From e0ab20d05c7cf1807194d40b222970700f9f92fc Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Tue, 17 Oct 2023 23:23:36 +0200 Subject: 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 --- src/lib/build/build.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib') 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}" -- cgit v1.2.3-70-g09d2