diff --git a/src/script_opt/CPP/maint/check-CPP-gen.sh b/src/script_opt/CPP/maint/check-CPP-gen.sh index a85901b1be..173081e689 100755 --- a/src/script_opt/CPP/maint/check-CPP-gen.sh +++ b/src/script_opt/CPP/maint/check-CPP-gen.sh @@ -6,7 +6,7 @@ gen_out=CPP-test/gen.$abbr ( /bin/echo -n $1" " - if ! src/zeek -O gen-C++ --optimize-files=testing/btest $1 >&$gen_out 2>&1; then + if ! src/zeek -O gen-C++ --optimize-files=testing/btest $1 >$gen_out 2>&1; then echo "fail" exit 1 fi diff --git a/src/script_opt/CPP/maint/check-zeek.sh b/src/script_opt/CPP/maint/check-zeek.sh index a61bd7ecb0..aadb3127f4 100755 --- a/src/script_opt/CPP/maint/check-zeek.sh +++ b/src/script_opt/CPP/maint/check-zeek.sh @@ -1,4 +1,4 @@ #! /bin/sh /bin/echo -n $1" " -(src/zeek --parse-only $1 >&/dev/null && echo "success") || echo "fail" +(src/zeek --parse-only $1 >/dev/null 2>&1 && echo "success") || echo "fail" diff --git a/src/script_opt/CPP/maint/do-CPP-btest.sh b/src/script_opt/CPP/maint/do-CPP-btest.sh index 55be391567..5c3aff7c62 100755 --- a/src/script_opt/CPP/maint/do-CPP-btest.sh +++ b/src/script_opt/CPP/maint/do-CPP-btest.sh @@ -7,10 +7,10 @@ cp zeek.HOLD src/zeek || ( exit 1 ) || exit 1 -if [ "$1" == "-U" ]; then +if [ "$1" = "-U" ]; then btest_opt=-U shift -elif [ "$1" == "-d" ]; then +elif [ "$1" = "-d" ]; then btest_opt=-d shift else @@ -32,7 +32,7 @@ export ZEEK_OPT_FILES="testing/btest" ) # export -n ZEEK_GEN_CPP ZEEK_CPP_DIR ZEEK_OPT_FUNCS ZEEK_OPT_FILES -export -n ZEEK_GEN_CPP ZEEK_REPORT_UNCOMPILABLE ZEEK_CPP_DIR ZEEK_OPT_FILES +unset ZEEK_GEN_CPP ZEEK_REPORT_UNCOMPILABLE ZEEK_CPP_DIR ZEEK_OPT_FILES ninja diff --git a/src/script_opt/CPP/maint/find-test-files.sh b/src/script_opt/CPP/maint/find-test-files.sh index 67eec15882..2774fefe37 100755 --- a/src/script_opt/CPP/maint/find-test-files.sh +++ b/src/script_opt/CPP/maint/find-test-files.sh @@ -5,6 +5,6 @@ find ../testing/btest -type f | grep -E '\.(zeek|test)$' | sort | xargs grep -E -l '^[ ]*(event|print)' | - xargs grep -E -lc 'REQUIRES.*CPP.*((!=.*1)|(==.*0))' | + xargs grep -E -c 'REQUIRES.*CPP.*((!=.*1)|(==.*0))' | grep ':0$' | sed 's,:0,,'