diff options
author | Ben Harris <ben@tilde.team> | 2021-12-05 20:16:00 -0500 |
---|---|---|
committer | Ben Harris <ben@tilde.team> | 2021-12-05 23:42:12 -0500 |
commit | 7e50cb1a54b3ed99f8081f976bf18ab85202469a (patch) | |
tree | 033f79740feb5a64e454f420ea863b180acfa5dc | |
parent | 1318b065a2e09fa85ae8639f3e9629c520bfd20a (diff) |
use long and short day num for getday.sh
-rw-r--r-- | aoc2021/DayXX.cs.txt | 4 | ||||
-rw-r--r-- | aoc2021/getday.sh | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/aoc2021/DayXX.cs.txt b/aoc2021/DayXX.cs.txt index d9fc52a..2fdc43d 100644 --- a/aoc2021/DayXX.cs.txt +++ b/aoc2021/DayXX.cs.txt @@ -1,11 +1,11 @@ namespace aoc2021; /// <summary> -/// Day XX: <see href="https://adventofcode.com/2021/day/XX"/> +/// Day P: <see href="https://adventofcode.com/2021/day/P"/> /// </summary> public sealed class DayXX : Day { - public DayXX() : base(XX, "Puzzle Name") + public DayXX() : base(P, "Puzzle Name") { } diff --git a/aoc2021/getday.sh b/aoc2021/getday.sh index e9d8d6a..d07e75f 100644 --- a/aoc2021/getday.sh +++ b/aoc2021/getday.sh @@ -17,6 +17,7 @@ curl -s https://adventofcode.com/2021/day/"$day"/input \ -o "$(printf "input/day%02d.in" "$day")" class=$(printf "Day%02d.cs" "$day") +longDay=$(printf "%02d" "$day") if [ ! -f "$class" ]; then - sed "s/XX/$1/g" DayXX.cs.txt > "$class" + sed -e "s/P/$day/g" -e "s/XX/$longDay/g" DayXX.cs.txt > "$class" fi |