Add support for xz image compression format (#1868)

Our next default.
This commit is contained in:
Igor Pečovnik 2020-04-04 18:29:42 +02:00 committed by GitHub
parent 03835a4b36
commit 874149e6ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -101,6 +101,11 @@ pack_upload ()
pigz < $DESTIMG/${version}.img > ${DESTIMG}/${version}.img.gz
fi
if [[ $COMPRESS_OUTPUTIMAGE == *xz* ]]; then
display_alert "Compressing" "$DEST/images/${version}.img.xz" "info"
pixz < $DESTIMG/${version}.img > ${DESTIMG}/${version}.img.xz
fi
if [[ -n "${SEND_TO_SERVER}" ]]; then
ssh "${SEND_TO_SERVER}" "mkdir -p ${SEND_TO_LOCATION}${BOARD}/{archive,nightly}" &
display_alert "Uploading" "Please wait!" "info"

View File

@ -659,6 +659,11 @@ create_image()
pigz < $DESTIMG/${version}.img > $DEST/images/${version}.img.gz
fi
if [[ $COMPRESS_OUTPUTIMAGE == *xz* ]]; then
display_alert "Compressing" "$DEST/images/${version}.img.xz" "info"
pixz < $DESTIMG/${version}.img > $DEST/images/${version}.img.xz
fi
mv $DESTIMG/${version}.img.txt $DEST/images/${version}.img.txt || exit 1
mv $DESTIMG/${version}.img $DEST/images/${version}.img || exit 1
rm -rf $DESTIMG