From fae17e1723d337e37803d68f5bff02dcb9d6e336 Mon Sep 17 00:00:00 2001 From: acheronfail Date: Fri, 22 Dec 2023 21:43:35 +1100 Subject: [PATCH] remove case statement --- justfile | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/justfile b/justfile index 44ccd37..9b1dbf8 100644 --- a/justfile +++ b/justfile @@ -22,25 +22,26 @@ measure what: just build {{what}} - case "{{what}}" in - ( - *"cobol"* - | *"haskell"* - | *"julia"* - | *"perl"* - | *"php"* - | *"prolog"* - | *"python"* - | *"ruby"* - | *"smalltalk"* - | *"tcl"* - ) - args="--runs 1" - ;; - (*) - args="--warmup 3" - ;; - esac + slow_langs=( + cobol + haskell + julia + perl + php + prolog + python + ruby + smalltalk + tcl + ) + + args="--warmup 3" + for language in "${slow_langs[@]}"; do + if [[ "{{what}}" == *"$language"* ]]; then + args="--runs 1" + break + fi + done out="{{what}}.json"