This can be useful when building completely different versions for the
first time to avoid issues with build artifacts of previous builds.
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
-a|--all)
ALL_RECIPES=1
;;
+ -c|--clean)
+ CLEAN=1
+ ;;
-g|--guest)
if [ "$2" ]; then
GUEST=$2
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