Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-06-29 10:22:07 +0200
committerErich Eckner <git@eckner.net>2020-06-29 10:22:07 +0200
commitfa17bbf63438645741e5fe19b862d1012ff7089a (patch)
tree9d5074da42a306efd1246cfd5ffea334510c8429 /bin
parentbdd39bbd259486ce0bbaa40ed5a18415926894f4 (diff)
bin/build-packages: exit early, if compressing the package fails
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-packages18
1 files changed, 17 insertions, 1 deletions
diff --git a/bin/build-packages b/bin/build-packages
index d03600e..46c1ef1 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -678,7 +678,23 @@ while [ "${count}" -ne 0 ] && \
# error, if the above build command already produced a
# compressed package.
find . -maxdepth 1 -type f -name '*.pkg.tar' \
- -execdir zstd -T0 --ultra -20 '{}' -o '{}.zst' \;
+ -execdir zstd --rm -T0 --ultra -20 '{}' -o '{}.zst' \;
+ # package files, that still exist, threw an error upon compression
+ errors=$(
+ find . -maxdepth 1 -type f -name '*.pkg.tar'
+ )
+ if [ -n "${errors}" ]; then
+ success=false
+ {
+ printf 'Building (and packaging) was successfull, but compressing the following packages failed:\n'
+ printf '%s\n' "${errors}"
+ } \
+ | tee -a "${log_file}"
+ fi
+ fi
+
+ if ${success}; then
+ # compressing successful
echo 'post-build' > "${tmp_dir}/.ping-build-master"
>&2 printf ' ok.\n'
if [ "${build_command}" = 'makepkg' ]; then