From 5bd89c0bbe3fe14361329433b5e36f68a6af2ef3 Mon Sep 17 00:00:00 2001 From: Thibault Martin <thi.martin.pro@pm.me> Date: Mon, 24 Jul 2023 11:40:16 +0200 Subject: [PATCH] Accept 'auto' and use [[ ... ]] --- bin/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/test.sh b/bin/test.sh index 72742e38f57..ed3665e5275 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -164,12 +164,12 @@ do VERBOSE=yes ;; "-j"|"--jobs") - if [[ $2 != \-* ]] && [ "$2" -ge 1 ]; then + if [[ $2 == "auto" ]] || ([[ $2 != \-* ]] && [[ $2 -ge 1 ]]); then DUNE_OPT+="-j $2 " shift else ErrorUsage \ - "wrong argument ('$2') for '-j|--jobs', int >= 1 expected" + "wrong opt ('$2') for '-j|--jobs', value 'auto' or >= 1 expected" fi ;; "-l"|"--logs") -- GitLab