From 02a535f4f6d4dea152107f61f5dc32b4118138c9 Mon Sep 17 00:00:00 2001 From: mhsn Date: Wed, 19 Mar 2025 22:57:16 +0000 Subject: update bench to use yash --- bench | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bench b/bench index e6a710d..bade9bf 100755 --- a/bench +++ b/bench @@ -1,10 +1,10 @@ -#!/usr/bin/env zsh +#!/usr/bin/env yash year=$1 day=$2 lang=$3 input=$4 -warmups=${5:=0} +warmups=${5:-0} script=$(readlink -f "$0") script_path=$(dirname "$script") @@ -14,7 +14,7 @@ data_path="$aoc_path/data/$4.txt" # Check it is correct $script_path/check $1 $2 $3 $4 > /dev/null -[[ ! $? ]] && echo "Incorrect solution" && exit 1 +[ ! $? ] && echo "Incorrect solution" && exit 1 if [[ $lang == "python" ]]; then @@ -28,4 +28,4 @@ else exit 1 fi -hyperfine --shell=none --warmup=$warmups --input=$data_path $exec +hyperfine --shell=none --warmup=$warmups --input=$data_path "$exec" -- cgit v1.2.3