Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 538 Bytes

README.md

File metadata and controls

35 lines (27 loc) · 538 Bytes

Advent of Code

Monorepo for all AoC solutions

Set up new year

YEAR=2018
mkdir -p ${YEAR}
sed s/YEAR/${YEAR}/g main.tpl > ${YEAR}/main.go
for DAY in {01..25}; do
    mkdir -p ${YEAR}/${DAY}
    sed s/DAY/day${DAY}/g solve.tpl > ${YEAR}/${DAY}/solve.go
done
git add -N ${YEAR}

Create runtime

YEAR=2018
go build -o adventofcode-${YEAR} ./${YEAR}

Solve puzzle

YEAR=2018
DAY=01
./adventofcode-${YEAR} day${DAY} -input ${YEAR}/${DAY}/input.txt