From 720b7c9b0524fd2dfb8b811985b55237ffe2de69 Mon Sep 17 00:00:00 2001 From: Christian Heusel Date: Thu, 15 Jun 2023 11:05:12 +0200 Subject: chore(build): skip invalid architectures on autodetection This is done so that pkgctl can be better used to build aur packages which can have arch=(...) settings for which we do not have a clean chroot builder. Signed-off-by: Christian Heusel --- src/lib/build/build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/lib/build') diff --git a/src/lib/build/build.sh b/src/lib/build/build.sh index aa2293c..ecdeaad 100644 --- a/src/lib/build/build.sh +++ b/src/lib/build/build.sh @@ -129,7 +129,7 @@ pkgctl_build() { local WORKER_SLOT= # variables - local path pkgbase pkgrepo source + local loop_arch path pkgbase pkgrepo source while (( $# )); do case $1 in @@ -318,7 +318,13 @@ pkgctl_build() { if in_array any "${arch[@]}"; then BUILD_ARCH=("${_arch[0]}") else - BUILD_ARCH+=("${arch[@]}") + for loop_arch in "${arch[@]}"; do + if in_array "${loop_arch}" "${_arch[@]}"; then + BUILD_ARCH+=("$loop_arch") + else + warning 'invalid architecture, not building for: %s' "${loop_arch}" + fi + done fi fi -- cgit v1.2.3-70-g09d2