diff options
author | Nat Lasseter <user@4574.co.uk> | 2018-12-02 20:55:15 +0000 |
---|---|---|
committer | Nat Lasseter <user@4574.co.uk> | 2018-12-02 20:55:15 +0000 |
commit | aa001e10900e62eca5b454a63932bd5725ffe0cd (patch) | |
tree | 14b904b014eb845d35b5576c8eb23321450aa10a | |
parent | bc515fe07c65f1a874733b29e1549de5b8d6dcc7 (diff) |
Makefile clean and entrypoint prettyness
-rw-r--r-- | day01/Makefile | 5 | ||||
-rwxr-xr-x | day01/entrypoint | 7 | ||||
-rw-r--r-- | day02/Makefile | 5 | ||||
-rwxr-xr-x | day02/entrypoint | 7 | ||||
-rw-r--r-- | skel/Makefile | 5 | ||||
-rwxr-xr-x | skel/entrypoint | 7 |
6 files changed, 27 insertions, 9 deletions
diff --git a/day01/Makefile b/day01/Makefile index 25b5946..759867a 100644 --- a/day01/Makefile +++ b/day01/Makefile @@ -1,6 +1,6 @@ DAY = 01 -.PHONY: run +.PHONY: run clean run: build sudo docker run -it --rm aoc2018day$(DAY) @@ -8,3 +8,6 @@ run: build build: part* input sudo docker build -t aoc2018day$(DAY) . touch build + +clean: + rm -f build diff --git a/day01/entrypoint b/day01/entrypoint index cff9f4c..8982d21 100755 --- a/day01/entrypoint +++ b/day01/entrypoint @@ -2,9 +2,12 @@ if [ -x part1 ] ; then echo -ne "Part 1:\n\t" - ./part1 < input + time ./part1 < input +fi +if [ -x part1 -a -x part2 ] ; then + echo fi if [ -x part2 ] ; then echo -ne "Part 2:\n\t" - ./part2 < input + time ./part2 < input fi diff --git a/day02/Makefile b/day02/Makefile index f57d8f4..e205428 100644 --- a/day02/Makefile +++ b/day02/Makefile @@ -1,6 +1,6 @@ DAY = 02 -.PHONY: run +.PHONY: run clean run: build sudo docker run -it --rm aoc2018day$(DAY) @@ -8,3 +8,6 @@ run: build build: part* input sudo docker build -t aoc2018day$(DAY) . touch build + +clean: + rm -f build diff --git a/day02/entrypoint b/day02/entrypoint index cff9f4c..8982d21 100755 --- a/day02/entrypoint +++ b/day02/entrypoint @@ -2,9 +2,12 @@ if [ -x part1 ] ; then echo -ne "Part 1:\n\t" - ./part1 < input + time ./part1 < input +fi +if [ -x part1 -a -x part2 ] ; then + echo fi if [ -x part2 ] ; then echo -ne "Part 2:\n\t" - ./part2 < input + time ./part2 < input fi diff --git a/skel/Makefile b/skel/Makefile index 6d7a96e..7c07df5 100644 --- a/skel/Makefile +++ b/skel/Makefile @@ -1,6 +1,6 @@ DAY = -.PHONY: run +.PHONY: run clean run: build sudo docker run -it --rm aoc2018day$(DAY) @@ -8,3 +8,6 @@ run: build build: part* input sudo docker build -t aoc2018day$(DAY) . touch build + +clean: + rm -f build diff --git a/skel/entrypoint b/skel/entrypoint index cff9f4c..8982d21 100755 --- a/skel/entrypoint +++ b/skel/entrypoint @@ -2,9 +2,12 @@ if [ -x part1 ] ; then echo -ne "Part 1:\n\t" - ./part1 < input + time ./part1 < input +fi +if [ -x part1 -a -x part2 ] ; then + echo fi if [ -x part2 ] ; then echo -ne "Part 2:\n\t" - ./part2 < input + time ./part2 < input fi |