From b1fa055ca8cc37717e09c7c9ca988533506b7134 Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Mon, 2 Dec 2024 13:08:14 -0500 Subject: [PATCH] allow build script customizations (#110) --- build.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index c29411a..22c3d5f 100755 --- a/build.sh +++ b/build.sh @@ -4,16 +4,21 @@ set -e # usage: ./build.sh [clean|clean --confirm|skiptest] -BUILD_DIR=cmake-build -# Choose: Debug, Release, RelWithDebInfo and MinSizeRel. Use Debug for asan checking locally. -BUILD_TYPE=Debug +if [[ -z "$BUILD_DIR" ]]; then + BUILD_DIR="cmake-build" +fi + +if [[ -z "$BUILD_TYPE" ]]; then + # Choose: Debug, Release, RelWithDebInfo and MinSizeRel. Use Debug for asan checking locally. + BUILD_TYPE="Debug" +fi BLUE="\033[0;34m" NC="\033[0m" if [[ "$1" == "clean" ]]; then echo -e "${BLUE}==== clean ====${NC}" - rm -rf $BUILD_DIR + rm -rf "$BUILD_DIR" # extracted and generated files rm -f metatron/auth_context.pb.cc rm -f metatron/auth_context.pb.h