From e8a5f0dfef50f8be6235eb205022f725e1927e8b Mon Sep 17 00:00:00 2001 From: David Mak Date: Wed, 4 Oct 2023 11:18:49 +0800 Subject: [PATCH] standalone: Fix parsing NAC3 args in check_demo.sh --- nac3standalone/demo/check_demo.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nac3standalone/demo/check_demo.sh b/nac3standalone/demo/check_demo.sh index bcf9a69f..85e5e99b 100755 --- a/nac3standalone/demo/check_demo.sh +++ b/nac3standalone/demo/check_demo.sh @@ -7,15 +7,19 @@ if [ -z "$1" ]; then exit 1 fi -demo="${@:-1}" -set -- "${@:1:$(($# - 1))}" +declare -a nac3args +while [ $# -gt 1 ]; do + nac3args+=("$1") + shift +done +demo="$1" echo -n "Checking $demo... " ./interpret_demo.py "$demo" > interpreted.log -./run_demo.sh "$@" "$demo" > run.log -./run_demo_lli.sh "$@" "$demo" > run_lli.log +./run_demo.sh "${nac3args[@]}" "$demo" > run.log +./run_demo_lli.sh "${nac3args[@]}" "$demo" > run_lli.log diff -Nau interpreted.log run.log diff -Nau interpreted.log run_lli.log echo "ok" -rm -f interpreted.log run.log run_lli.log +rm -f interpreted.log run.log run_lli.log \ No newline at end of file