~ubuntu-core-dev/livecd-rootfs/artful-proposed

« back to all changes in this revision

Viewing changes to live-build/ubuntu-cpc/hooks/040-qcow2-image.binary

  • Committer: Balint Reczey
  • Date: 2019-01-31 08:14:48 UTC
  • Revision ID: balint.reczey@canonical.com-20190131081448-m64tclkf56dt8fzb
Moved to git at https://git.launchpad.net/livecd-rootfs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash -ex
2
 
 
3
 
case $IMAGE_TARGETS in
4
 
        ""|*qcow2*)
5
 
                ;;
6
 
        *)
7
 
                echo "Skipping qcow2 image build"
8
 
                exit 0
9
 
                ;;
10
 
esac
11
 
 
12
 
case $ARCH:$SUBARCH in
13
 
        # Not sure if any other cloud images use subarch for something that
14
 
        # should take qcow2 format, so only skipping this on raspi2 for now.
15
 
        armhf:raspi2)
16
 
                xz -0 -T4 -c binary/boot/disk.ext4 > livecd.ubuntu-cpc.disk1.img.xz
17
 
                exit 0
18
 
                ;;
19
 
esac
20
 
 
21
 
. config/functions
22
 
 
23
 
if [ -f binary/boot/disk-uefi.ext4 ]; then
24
 
    convert_to_qcow2 binary/boot/disk-uefi.ext4 livecd.ubuntu-cpc.img
25
 
elif [ -f binary/boot/disk.ext4 ]; then
26
 
    convert_to_qcow2 binary/boot/disk.ext4 livecd.ubuntu-cpc.img
27
 
fi