From: Tobias Brunner Date: Mon, 9 Nov 2020 13:55:46 +0000 (+0100) Subject: testing: Optionally replace root image when building strongSwan X-Git-Tag: 5.9.2dr1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7d920059e395bacd7301218b4e32468b488f239;p=thirdparty%2Fstrongswan.git testing: Optionally replace root image when building strongSwan --- diff --git a/testing/scripts/build-strongswan b/testing/scripts/build-strongswan index 3b57669147..2efd4329b8 100755 --- a/testing/scripts/build-strongswan +++ b/testing/scripts/build-strongswan @@ -20,17 +20,19 @@ mkdir -p $IMGDIR usage() { cat << EOF -Usage: ${0##*/} [--all] [--clean] [--guest NAME] [SRCDIR] +Usage: ${0##*/} [--all] [--clean] [--guest NAME] [--replace] [SRCDIR] --help (-h) show usage information --all (-a) build/install all software, not only strongSwan --clean (-c) use a new strongSwan build directory --guest NAME (-g) only install in a specific guest image + --replace (-r) replace the root image (implies --all) EOF } ALL_RECIPES= CLEAN= GUEST= +REPLACE= while :; do case $1 in @@ -52,6 +54,9 @@ while :; do die "Guest name missing" fi ;; + -r|--replace) + REPLACE=1 + ;; *) break esac @@ -66,7 +71,7 @@ SWANDIR=${1:+$(readlink -f $1)} case "$GUEST" in "") - if [ ! -f "$ROOTIMG" ]; then + if [ ! -f "$ROOTIMG" -o "$REPLACE" ]; then log_action "Creating root image $ROOTIMG" execute "qemu-img create -b $BASEIMG -f $IMGEXT $ROOTIMG" ALL_RECIPES=1