livecd-rootfs/live-build/ubuntu-cpc/hooks/040-qcow2-image.binary

28 lines
630 B
Plaintext
Raw Normal View History

#!/bin/bash -ex
case $IMAGE_TARGETS in
""|*qcow2*)
;;
*)
echo "Skipping qcow2 image build"
exit 0
;;
esac
2016-02-10 23:51:54 -08:00
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
2016-02-10 23:51:54 -08:00
exit 0
;;
esac
. config/functions
if [ -f binary/boot/disk-uefi.ext4 ]; then
convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.img
elif [ -f binary/boot/disk.ext4 ]; then
convert_to_qcow2 binary/boot/disk.ext4 livecd.ubuntu-cpc.img
fi