update benchmark script

This commit is contained in:
Felix Van der Jeugt 2023-12-03 12:35:24 +01:00
parent aeb63e2f5d
commit 6c6dfac1b6
No known key found for this signature in database
GPG key ID: 58B209295023754D
2 changed files with 8 additions and 2 deletions

1
2023/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
inputs

View file

@ -1,8 +1,13 @@
#!/bin/sh #!/bin/sh
day="$(printf '%02d' ${1##0})" day="$(printf '%02d' ${1##0})"
part="$2" 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 if ! test -f "$inputfile"; then
echo "no input available" >&2 echo "no input available" >&2
@ -14,7 +19,7 @@ for dir in *; do
cd "$dir" cd "$dir"
if test -x ./prepare; then if test -x ./prepare; then
echo "---------------------------------------------------------------------------------- $dir" 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' echo 'eh ge hebt precies niet alles geïnstalleerd staan'
else else
if test -x run; then if test -x run; then