2023-12-01 13:32:30 +00:00
|
|
|
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
|
|
echo "Parameter expected: <day>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$1" == "--help" ]; then
|
|
|
|
echo "Usage: $0 <dayxx>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! [ -d "$1" ]; then
|
|
|
|
echo "Not a directory: $1"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "$1"
|
|
|
|
|
|
|
|
case "$1" in
|
2023-12-05 19:29:01 +00:00
|
|
|
# Solutions -- Haskell
|
|
|
|
"day01a" | "day01b" | \
|
|
|
|
"day02a" | "day02b" | \
|
|
|
|
"day03a" | "day03b" | \
|
2023-12-06 18:21:47 +00:00
|
|
|
"day04a" | "day04b" | \
|
2023-12-08 03:08:48 +00:00
|
|
|
"day06a" | "day06b" | \
|
2023-12-09 03:42:17 +00:00
|
|
|
"day07a" | "day07b" | \
|
|
|
|
"day08a" | "day08b" ) stack run <test.txt
|
2023-12-05 19:29:01 +00:00
|
|
|
;;
|
|
|
|
# Default solutions -- Java
|
|
|
|
*) ./gradlew run <test.txt
|
2023-12-01 13:32:30 +00:00
|
|
|
;;
|
|
|
|
esac
|