#!/usr/bin/env bash cd "{{ .Project }}" || exit 1 go mod init github.com/onyx-and-iris/aoc{{ .Scaffold.year }}/"{{ .Project }}" go mod tidy # shellcheck disable=SC2001 day=$(echo "{{ .Project }}" | sed 's/^day-0*//') mkdir -p testdata curl "https://adventofcode.com/{{ .Scaffold.year }}/day/$day/input" -H "Cookie: session=$AOC_SESSION" > testdata/input.txt mkdir -p cmd/cli/testdata && ln testdata/input.txt cmd/cli/testdata/input.txt mkdir -p internal/one/testdata && ln testdata/input.txt internal/one/testdata/input.txt mkdir -p internal/two/testdata && ln testdata/input.txt internal/two/testdata/input.txt