From 379e419aad3edfa7eee2e41a48934e4220a52e61 Mon Sep 17 00:00:00 2001 From: Duke Date: Wed, 12 Jun 2024 13:12:20 -0400 Subject: [PATCH] Convenience script for doing a debug build while autodecting correct OS build script --- debug-build.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 debug-build.sh diff --git a/debug-build.sh b/debug-build.sh new file mode 100755 index 000000000..a18818b20 --- /dev/null +++ b/debug-build.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# Copyright (c) 2016-2024 The Hush developers +# Distributed under the GPLv3 software license, see the accompanying +# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html + +set -eu -o pipefail + +echo "Compiling a debug build with --enable-debug..." + +# run correct build script for detected OS +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + CONFIGURE_FLAGS=--enable-debug ./util/build.sh --disable-tests $@ +elif [[ "$OSTYPE" == "darwin"* ]]; then + # code from ./util/build.sh needs to be ported to support --disable-tests + #./util/build-mac.sh --disable-tests $@ + CONFIGURE_FLAGS=--enable-debug ./util/build-mac.sh $@ +elif [[ "$OSTYPE" == "msys"* ]]; then + CONFIGURE_FLAGS=--enable-debug ./util/build-win.sh --disable-tests $@ +elif [[ "$OSTYPE" == "freebsd"* ]]; then + CONFIGURE_FLAGS=--enable-debug ./util/build.sh --disable-tests $@ +else + echo "Unable to detect your OS. What are you using?" +fi