From 906e5410b5b6222882fa0aaddbb88d012aef6914 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Thu, 2 Feb 2023 08:22:52 +0100 Subject: Calculate number of builds using arithmetic --- mingw-w64-build | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mingw-w64-build b/mingw-w64-build index 1ccc7b8..3f43a1c 100755 --- a/mingw-w64-build +++ b/mingw-w64-build @@ -36,6 +36,9 @@ ENABLE_THREADS="--enable-threads=posix" JOB_COUNT=$(($(getconf _NPROCESSORS_ONLN) + 2)) +BUILD_I686=0 +BUILD_X86_64=0 + LINKED_RUNTIME="msvcrt" show_help() @@ -439,7 +442,8 @@ while :; do shift done -if [ ! "$BUILD_I686" ] && [ ! "$BUILD_X86_64" ]; then +NUM_BUILDS=$((BUILD_I686 + BUILD_X86_64)) +if [ "$NUM_BUILDS" -eq 0 ]; then arg_error "no ARCH was specified" fi @@ -473,12 +477,8 @@ else THREADS_STEPS=0 fi -if [ "$BUILD_I686" ] && [ "$BUILD_X86_64" ]; then - THREADS_STEPS=$((THREADS_STEPS * 2)) - BUILD_STEPS=26 -else - BUILD_STEPS=13 -fi +THREADS_STEPS=$((THREADS_STEPS * NUM_BUILDS)) +BUILD_STEPS=$((13 * NUM_BUILDS)) if [ ! -z "${TARBALL}" ]; then TOTAL_STEPS=$((TOTAL_STEPS + 1)) -- cgit v1.2.3