diff options
author | Thomas Perl <m@thp.io> | 2023-02-02 08:22:52 +0100 |
---|---|---|
committer | Zeranoe <zeranoe@gmail.com> | 2023-02-04 16:08:10 -0500 |
commit | 3a43e408f90fadb2ed5b8084e1bedd4ae6774125 (patch) | |
tree | b0b06955b014295d9c9598b2c0be68362f94c696 | |
parent | e8709bd544b58b0b5aedc47e709cfb5999a5f484 (diff) |
Calculate number of builds using arithmetic
-rwxr-xr-x | mingw-w64-build | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mingw-w64-build b/mingw-w64-build index 4db49c7..36495dd 100755 --- a/mingw-w64-build +++ b/mingw-w64-build @@ -26,6 +26,9 @@ ENABLE_THREADS="--enable-threads=posix" JOB_COUNT=$(($(getconf _NPROCESSORS_ONLN) + 2)) +BUILD_I686=0 +BUILD_X86_64=0 + LINKED_RUNTIME="msvcrt" show_help() @@ -372,7 +375,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 @@ -402,12 +406,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)) TOTAL_STEPS=$((TOTAL_STEPS + THREADS_STEPS + BUILD_STEPS)) |