From f0959c9283f90e07fc56474af774a88a9bea5275 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Thu, 1 Aug 2024 16:05:24 +0200 Subject: [PATCH] packages: roms, src: release: xz: show progress. The xz compression operation can be quite long, so it's a good idea to show its progression. To do that we need to produce a tarball file first as xz doesn't have any idea of the progression when just compressing a piped stream of data. Signed-off-by: Denis 'GNUtoo' Carikli Acked-by: Adrien Bourmault --- resources/packages/roms/release | 4 +++- resources/packages/src/release | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/packages/roms/release b/resources/packages/roms/release index 4e919d7..af0cf69 100755 --- a/resources/packages/roms/release +++ b/resources/packages/roms/release @@ -60,7 +60,9 @@ printf "Building ROM image archives for version %s\n" "${version}" printf "%s\n" "${version}" > "${target}/version" printf "%s\n" "${versiondate}" > "${target}/versiondate" printf "%s\n" "${projectname}" > "${target}/projectname" - tar -c "${target}/" | xz -9e >"../release/roms/${projectname}-${version}_${target##*/}.tar.xz" + rm -f ../release/roms/"${projectname}"-"${version}"_"${target##*/}".tar + tar -cf ../release/roms/"${projectname}"-"${version}"_"${target##*/}".tar "${target}/" + xz -vv -9e -f ../release/roms/"${projectname}"-"${version}"_"${target##*/}".tar done ) diff --git a/resources/packages/src/release b/resources/packages/src/release index 6a364c4..f27aeb4 100755 --- a/resources/packages/src/release +++ b/resources/packages/src/release @@ -113,7 +113,9 @@ cd "${reldir}/" printf "%s\n" "${version}" > "${dirname}/version" printf "%s\n" "${versiondate}" > "${dirname}/versiondate" printf "%s\n" "${projectname}" > "${dirname}/projectname" -tar -c "${dirname}/" | xz -9e >"${dirname}.tar.xz" +rm -f "${dirname}".tar +tar -cf "${dirname}".tar "${dirname}/" +xz -vv -9e -f "${dirname}".tar rm -Rf "${dirname}/" )