From 6c6dfac1b6629304bbb5135017892bd4ddca1849 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Sun, 3 Dec 2023 12:35:24 +0100 Subject: [PATCH] update benchmark script --- 2023/.gitignore | 1 + 2023/complete-benchmark | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 2023/.gitignore diff --git a/2023/.gitignore b/2023/.gitignore new file mode 100644 index 0000000..15d7aef --- /dev/null +++ b/2023/.gitignore @@ -0,0 +1 @@ +inputs diff --git a/2023/complete-benchmark b/2023/complete-benchmark index c592a62..bcfd460 100755 --- a/2023/complete-benchmark +++ b/2023/complete-benchmark @@ -1,8 +1,13 @@ #!/bin/sh day="$(printf '%02d' ${1##0})" part="$2" +inputfile="$3" -inputfile="$PWD/francis-punt/${day}_input.txt" +case "$inputfile" in +"") inputfile="$PWD/francis-punt/${day}_input.txt";; +/*) ;; +*) inputfile="$PWD/$inputfile";; +esac if ! test -f "$inputfile"; then echo "no input available" >&2 @@ -14,7 +19,7 @@ for dir in *; do cd "$dir" if test -x ./prepare; then echo "---------------------------------------------------------------------------------- $dir" - if ! ./prepare "$day" "$part" >&2; then + if ! ./prepare "$day" "$part" "$inputfile" >&2; then echo 'eh ge hebt precies niet alles geïnstalleerd staan' else if test -x run; then