From af95ba501214eb40a0405296de198390bd6e21e7 Mon Sep 17 00:00:00 2001 From: David Mak Date: Wed, 24 Jan 2024 16:54:57 +0800 Subject: [PATCH] standalone: Add debug flag to run_demo.sh Allows running demos using the debug build instead of the (default) release build. --- nac3standalone/demo/run_demo.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nac3standalone/demo/run_demo.sh b/nac3standalone/demo/run_demo.sh index 0f4f62538..670c3ce8f 100755 --- a/nac3standalone/demo/run_demo.sh +++ b/nac3standalone/demo/run_demo.sh @@ -17,6 +17,9 @@ while [ $# -ge 1 ]; do --lli) use_lli=1 ;; + --debug) + debug=1 + ;; *) nac3args+=("$1") ;; @@ -24,7 +27,9 @@ while [ $# -ge 1 ]; do shift done -if [ -e ../../target/release/nac3standalone ]; then +if [ -n "$debug" ] && [ -e ../../target/debug/nac3standalone ]; then + nac3standalone=../../target/debug/nac3standalone +elif [ -e ../../target/release/nac3standalone ]; then nac3standalone=../../target/release/nac3standalone else # used by Nix builds