mkdir directory of autogenerated images
authorLudwig Nussel <ludwig.nussel@suse.de>
Thu, 29 Apr 2010 12:28:39 +0000 (14:28 +0200)
committerLudwig Nussel <ludwig.nussel@suse.de>
Thu, 29 Apr 2010 14:08:22 +0000 (16:08 +0200)
build

diff --git a/build b/build
index abe8329..02177e2 100755 (executable)
--- a/build
+++ b/build
@@ -1103,6 +1103,7 @@ if test -z "$RUNNING_IN_VM" ; then
        fi
        if test ! -e "$VM_IMAGE"; then
            echo "Creating $VM_IMAGE (${VMDISK_ROOTSIZE}M)"
+           mkdir -p "${VM_IMAGE%/*}"
            dd if=/dev/zero of="$VM_IMAGE" bs=1 count=1 seek=$(( ${VMDISK_ROOTSIZE} * 1024 * 1024 )) || cleanup_and_exit 3
            if test -z "$CLEAN_BUILD" ; then
                vm_img_mkfs "$VMDISK_FILESYSTEM" "$VM_IMAGE" || cleanup_and_exit 3
@@ -1111,6 +1112,7 @@ if test -z "$RUNNING_IN_VM" ; then
        if test ! -e "$VM_SWAP"; then
            # setup VM_SWAP
            echo "Creating $VM_SWAP (${VMDISK_SWAPSIZE}M)"
+           mkdir -p "${VM_SWAP%/*}"
            dd if=/dev/zero of="$VM_SWAP" bs=1 count=1 seek=$(( ${VMDISK_SWAPSIZE} * 1024 * 1024 )) || cleanup_and_exit 3
        fi
        if test ! -e "$VM_IMAGE" ; then