livecd-rootfs/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary
Balint Reczey cbf0a7c417 Use default xz compression (-6) for raspi2 image
Xz with -0 generated ~35% bigger compressed image.

LP: #1732681
2017-12-05 22:40:35 +01:00

22 lines
544 B
Bash
Executable File

#!/bin/bash -ex
case $ARCH:$SUBARCH in
# Not sure if any other cloud images use subarch for something that
# should take qcow2 format, so only skipping this on raspi2 for now.
armhf:raspi2)
xz -T4 -c binary/boot/disk.ext4 > livecd.ubuntu-cpc.disk1.img.xz
exit 0
;;
esac
. config/functions
if [ -f binary/boot/disk.ext4 ]; then
convert_to_qcow2 binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.img
fi
if [ -f binary/boot/disk-uefi.ext4 ]; then
convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.uefi1.img
fi