From: Tobias Brunner Date: Thu, 29 Oct 2020 17:04:22 +0000 (+0100) Subject: testing: Create root image if it does not exist yet when building strongSwan X-Git-Tag: 5.9.2dr1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edc55f087661ac9e7cb1f407441a9d6cb882e505;p=thirdparty%2Fstrongswan.git testing: Create root image if it does not exist yet when building strongSwan This allows running the script directly after building the base image. --- diff --git a/testing/scripts/build-strongswan b/testing/scripts/build-strongswan index d872e72854..b7a44d66cc 100755 --- a/testing/scripts/build-strongswan +++ b/testing/scripts/build-strongswan @@ -26,6 +26,10 @@ mkdir -p $IMGDIR case "$2" in "") + if [ ! -f "$ROOTIMG" ]; then + log_action "Creating root image $ROOTIMG" + execute "qemu-img create -b $BASEIMG -f $IMGEXT $ROOTIMG" + fi log_action "Connecting root image to NBD device $NBDEV" execute "qemu-nbd -c $NBDEV $ROOTIMG" ;;