From 4d6471b0c9a423a375557541ed45ab2588fc8e55 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 24 Feb 2021 11:20:27 +0100 Subject: bin/build-packages: try even more compression levels and disable multithreading if the first attempt fails --- bin/build-packages | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/build-packages b/bin/build-packages index 80ba1ce..512c684 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -679,11 +679,14 @@ while [ "${count}" -ne 0 ] && \ # error, if the above build command already produced a # compressed package. # Since --ultra -20 seems too much for our i486 build vms, we - # silently fall back to -19 (without --ultra) if the higher + # silently fall back to lower compression levels if the higher # level fails. - find . -maxdepth 1 -type f -name '*.pkg.tar' \ - -not -execdir zstd --rm -T0 --ultra -20 '{}' -o '{}.zst' \; \ - -execdir zstd --rm -T0 -19 '{}' -o '{}.zst' \; + + # shellcheck disable=SC2086 + for options in '-T0 --ultra -20' '--ultra -20' {-19..-3}; do + find . -maxdepth 1 -type f -name '*.pkg.tar' \ + -execdir zstd --rm ${options} '{}' -o '{}.zst' \; + done # package files, that still exist, threw an error upon compression errors=$( find . -maxdepth 1 -type f -name '*.pkg.tar' -- cgit v1.2.3