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 <GNUtoo@cyberdimension.org>
Acked-by: Adrien Bourmault <neox@gnu.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2024-08-01 16:05:24 +02:00 committed by Adrien Bourmault
parent 860b00bf1e
commit f0959c9283
Signed by: neox
GPG Key ID: 57BC26A3687116F6
2 changed files with 6 additions and 2 deletions

View File

@ -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
)

View File

@ -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}/"
)