summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-02-24 11:20:27 +0100
committerErich Eckner <git@eckner.net>2021-02-24 11:20:27 +0100
commit4d6471b0c9a423a375557541ed45ab2588fc8e55 (patch)
tree09100f41b60436e2c4e80eeed1c7dc8be851b6f8 /bin
parent8c12e9daf3979ba25e01b968214009612d28808a (diff)
downloadbuilder-4d6471b0c9a423a375557541ed45ab2588fc8e55.tar.xz
bin/build-packages: try even more compression levels and disable multithreading if the first attempt fails
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-packages11
1 files changed, 7 insertions, 4 deletions
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'