aboutsummaryrefslogtreecommitdiffstats
path: root/aoc
blob: 8e144fbfaa21fdf6d0e08a5d34df7c0300e83657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

DAY="${1}"
if [ -z "${DAY}" ]; then
    echo "usage: ${0} day01"
    exit 1
fi

set -euo pipefail

cd "${DAY}"
if [ ! -f "input.txt" ]; then
    echo "input.txt not found in ${DAY}"
    exit 1
fi

ghc ../utils.hs main.hs && (cat input.txt | ./main)