From c6077abaab083d49c01be8801487bfb07ae460ad Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Mon, 7 Dec 2015 11:45:58 -0700 Subject: [PATCH] ubuntu-cpc: create VMDK's for disk images if they exist. Remove assumption that disk1.img will exist. --- live-build/ubuntu-cpc/hooks/040-vmdk-image.binary | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/live-build/ubuntu-cpc/hooks/040-vmdk-image.binary b/live-build/ubuntu-cpc/hooks/040-vmdk-image.binary index 44f876dc..7345bf4e 100755 --- a/live-build/ubuntu-cpc/hooks/040-vmdk-image.binary +++ b/live-build/ubuntu-cpc/hooks/040-vmdk-image.binary @@ -6,16 +6,18 @@ architecture=$(chroot chroot dpkg --print-architecture) extension="disk1.vmdk" + case ${architecture} in - i386) image_target="binary/boot/disk.ext4";; - amd64) image_target="binary/boot/disk-uefi.ext4"; extension="uefi1.vmdk";; - *) echo "VMDK images are not supported for ${architecture} yet."; - exit 0;; + i386|amd64) ;; + *) echo "VMDK images are not supported for ${architecture} yet."; + exit 0;; esac . /build/config/functions -create_vmdk binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.vmdk +if [ -e binary/boot/disk.ext4 ]; then + create_vmdk binary/boot/disk.ext4 livecd.ubuntu-cpc.disk1.vmdk +fi if [ -e binary/boot/disk-uefi.ext4 ]; then create_vmdk binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.uefi.vmdk