From 750fc33e4eb049a57cfd3594ee8e51677eb3368a Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Sat, 15 Jun 2024 08:10:44 +0200 Subject: [gdb/testsuite] Clean up lib/dg-add-core-file-count.sh Fix shellcheck warnings in script lib/dg-add-core-file-count.sh. Tested on x86_64-linux. Approved-by: Kevin Buettner --- gdb/testsuite/lib/dg-add-core-file-count.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/dg-add-core-file-count.sh b/gdb/testsuite/lib/dg-add-core-file-count.sh index 45cf0cf..b4cb6b9 100755 --- a/gdb/testsuite/lib/dg-add-core-file-count.sh +++ b/gdb/testsuite/lib/dg-add-core-file-count.sh @@ -26,7 +26,7 @@ # find, wc, etc. Spawning a subshell isn't strictly needed, but it's # clearer. The "*core*" pattern is this lax in order to find all of # "core", "core.PID", "core..PID", ".core", etc. -cores=$(set -- *core*; [ $# -eq 1 -a ! -e "$1" ] && shift; echo $#) +cores=$(set -- *core*; [ $# -eq 1 ] && [ ! -e "$1" ] && shift; echo $#) # If no cores found, then don't add our summary line. if [ "$cores" -eq "0" ]; then -- cgit v1.1