]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Optionally use a new strongSwan build directory
authorTobias Brunner <tobias@strongswan.org>
Mon, 9 Nov 2020 13:38:50 +0000 (14:38 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 27 Nov 2020 11:05:22 +0000 (12:05 +0100)
This can be useful when building completely different versions for the
first time to avoid issues with build artifacts of previous builds.

testing/scripts/build-strongswan

index 842079cdb1e9e8eb444b44ca965425c5bb9d34c6..3b576691470d9902c34aa67fa84114747a0cb5f1 100755 (executable)
@@ -20,15 +20,17 @@ mkdir -p $IMGDIR
 
 usage() {
 cat << EOF
-Usage: ${0##*/} [--all] [--guest NAME] [SRCDIR]
+Usage: ${0##*/} [--all] [--clean] [--guest NAME] [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
 EOF
 }
 
-GUEST=
 ALL_RECIPES=
+CLEAN=
+GUEST=
 
 while :; do
        case $1 in
@@ -39,6 +41,9 @@ while :; do
        -a|--all)
                ALL_RECIPES=1
                ;;
+       -c|--clean)
+               CLEAN=1
+               ;;
        -g|--guest)
                if [ "$2" ]; then
                        GUEST=$2
@@ -133,6 +138,9 @@ else
        RECIPES=`ls $RECPDIR/*strongswan.mk | xargs -n1 basename`
 fi
 
+if [ "$CLEAN" ]; then
+       rm -rf $SHAREDDIR/build-strongswan
+fi
 mkdir -p $SHAREDDIR/build-strongswan
 mkdir -p $SHAREDDIR/compile