]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Make building guest images after strongSwan optional
authorTobias Brunner <tobias@strongswan.org>
Mon, 9 Nov 2020 15:15:20 +0000 (16:15 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 27 Nov 2020 11:05:22 +0000 (12:05 +0100)
This is basically only for the build-rootimage use case.

testing/scripts/build-strongswan

index 77363436e3464c07c78e7d816774f56ca5b6a52d..779ec8bb372cd3758c96cb4594afcb6e2b55c1ed 100755 (executable)
@@ -21,12 +21,13 @@ mkdir -p $IMGDIR
 usage() {
 cat << EOF
 Usage:
-  ${0##*/} [--all] [--guest NAME] [--replace] [--clean] [SRCDIR]
-  ${0##*/} [--all] [--guest NAME] [--replace] [--tarball VERSION]
+  ${0##*/} [--all] [--guest NAME|--no-guests] [--replace] [--clean] [SRCDIR]
+  ${0##*/} [--all] [--guest NAME|--no-guests] [--replace] [--tarball VERSION]
     --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
+    --no-guests       (-n)  don't build any guest images after the root image
     --replace         (-r)  replace the root image (implies --all)
     --tarball         (-t)  build strongSwan from a release tarball
 EOF
@@ -35,6 +36,7 @@ EOF
 ALL_RECIPES=
 CLEAN=
 GUEST=
+NO_GUESTS=
 REPLACE=
 TARBALL=
 
@@ -58,6 +60,9 @@ while :; do
                        die "Guest name missing"
                fi
                ;;
+       -n|--no-guests)
+               NO_GUESTS=1
+               ;;
        -r|--replace)
                REPLACE=1
                ;;
@@ -182,7 +187,7 @@ do
 done
 
 # rebuild the guest images after we modified the root image
-if [ -z "$GUEST" ]; then
+if [ -z "$GUEST" -a -z "$NO_GUESTS" ]; then
        # cleanup before mounting guest images
        on_exit
        # building the guest images without certificates fails on winnetou