Put compress to .7z back to individual builds - when needed.

This commit is contained in:
Igor Pecovnik 2017-04-27 08:57:52 +02:00
parent b1867f2af5
commit 3b261c347b

View file

@ -473,6 +473,19 @@ create_image()
mkdir -p $CACHEDIR/$DESTIMG
cp $CACHEDIR/$SDCARD/etc/armbian.txt $CACHEDIR/$DESTIMG
mv $CACHEDIR/${SDCARD}.raw $CACHEDIR/$DESTIMG/${version}.img
if [[ $COMPRESS_OUTPUTIMAGE == yes && $BUILD_ALL != yes ]]; then
# compress image
cd $CACHEDIR/$DESTIMG
sha256sum -b ${version}.img > sha256sum.sha
if [[ -n $GPG_PASS ]]; then
echo $GPG_PASS | gpg --passphrase-fd 0 --armor --detach-sign --batch --yes ${version}.img
echo $GPG_PASS | gpg --passphrase-fd 0 --armor --detach-sign --batch --yes armbian.txt
fi
display_alert "Compressing" "$DEST/images/${version}.img" "info"
7za a -t7z -bd -m0=lzma2 -mx=3 -mfb=64 -md=32m -ms=on $DEST/images/${version}.7z ${version}.img armbian.txt *.asc sha256sum.sha >/dev/null 2>&1
fi
#
if [[ $BUILD_ALL != yes ]]; then
mv $CACHEDIR/$DESTIMG/${version}.img $DEST/images/${version}.img
rm -rf $CACHEDIR/$DESTIMG