From c1dc7c41490607eb3ee80404b4121cfd7fc5db5d Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 9 Nov 2020 14:38:50 +0100 Subject: [PATCH] testing: Optionally use a new strongSwan build directory 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 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/testing/scripts/build-strongswan b/testing/scripts/build-strongswan index 842079cdb..3b5766914 100755 --- a/testing/scripts/build-strongswan +++ b/testing/scripts/build-strongswan @@ -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