Improve XZ compression support

Cleanup after upload, download scripts also supports this format

Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
This commit is contained in:
Igor Pecovnik 2020-04-04 21:04:34 +02:00
parent 874149e6ad
commit b607b666b3
No known key found for this signature in database
GPG Key ID: 93D6889F9F0E78D5
2 changed files with 7 additions and 5 deletions

View File

@ -98,12 +98,13 @@ pack_upload ()
if [[ $COMPRESS_OUTPUTIMAGE == *gz* ]]; then
display_alert "Compressing" "$DEST/images/${version}.img.gz" "info"
pigz < $DESTIMG/${version}.img > ${DESTIMG}/${version}.img.gz
pigz $DESTIMG/${version}.img
fi
if [[ $COMPRESS_OUTPUTIMAGE == *xz* ]]; then
if [[ $COMPRESS_OUTPUTIMAGE == *xz* ]]; then
display_alert "Compressing" "$DEST/images/${version}.img.xz" "info"
pixz < $DESTIMG/${version}.img > ${DESTIMG}/${version}.img.xz
pixz -3 < $DESTIMG/${version}.img > ${DESTIMG}/${version}.img.xz
find $DESTIMG -type f -name '${version}.img' -print0 | xargs -0 rm --
fi
if [[ -n "${SEND_TO_SERVER}" ]]; then

View File

@ -656,12 +656,13 @@ create_image()
if [[ $COMPRESS_OUTPUTIMAGE == *gz* ]]; then
display_alert "Compressing" "$DEST/images/${version}.img.gz" "info"
pigz < $DESTIMG/${version}.img > $DEST/images/${version}.img.gz
pigz $DESTIMG/${version}.img
fi
if [[ $COMPRESS_OUTPUTIMAGE == *xz* ]]; then
display_alert "Compressing" "$DEST/images/${version}.img.xz" "info"
pixz < $DESTIMG/${version}.img > $DEST/images/${version}.img.xz
pixz -3 < $DESTIMG/${version}.img > $DEST/images/${version}.img.xz
find $DESTIMG -type f -name '${version}.img' -print0 | xargs -0 rm --
fi
mv $DESTIMG/${version}.img.txt $DEST/images/${version}.img.txt || exit 1