From: Tobias Brunner Date: Mon, 9 Nov 2020 13:38:50 +0000 (+0100) Subject: testing: Optionally use a new strongSwan build directory X-Git-Tag: 5.9.2dr1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1dc7c41490607eb3ee80404b4121cfd7fc5db5d;p=thirdparty%2Fstrongswan.git 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. --- diff --git a/testing/scripts/build-strongswan b/testing/scripts/build-strongswan index 842079cdb1..3b57669147 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