From: Tom de Vries Date: Sat, 15 Jun 2024 06:10:44 +0000 (+0200) Subject: [gdb/testsuite] Clean up lib/dg-add-core-file-count.sh X-Git-Tag: binutils-2_43~388 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=750fc33e4eb049a57cfd3594ee8e51677eb3368a;p=thirdparty%2Fbinutils-gdb.git [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 --- diff --git a/gdb/testsuite/lib/dg-add-core-file-count.sh b/gdb/testsuite/lib/dg-add-core-file-count.sh index 45cf0cf3bd5..b4cb6b93ea4 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