ubuntu-cpc: clean up qcow2 image builds

- use convert_to_qcow2 to create the qcow2
- remove assumption of disk1.img existing
ubuntu/yakkety
Ben Howard 9 years ago
parent c6077abaab
commit 421269a732

@ -2,15 +2,12 @@
apt-get install -qqy qemu-utils apt-get install -qqy qemu-utils
convert_image() { . /build/config/functions
src="$1"
destination="$2"
qemu-img convert -c -O qcow2 -o compat=0.10 "$src" "$destination"
qemu-img info "$destination"
}
convert_image binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.img 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 if [ -f binary/boot/disk-uefi.ext4 ]; then
convert_image binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.uefi1.img convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.uefi1.img
fi fi

Loading…
Cancel
Save