aboutsummaryrefslogtreecommitdiff
path: root/day01
diff options
context:
space:
mode:
authorNat Lasseter <user@4574.co.uk>2018-12-02 20:55:15 +0000
committerNat Lasseter <user@4574.co.uk>2018-12-02 20:55:15 +0000
commitaa001e10900e62eca5b454a63932bd5725ffe0cd (patch)
tree14b904b014eb845d35b5576c8eb23321450aa10a /day01
parentbc515fe07c65f1a874733b29e1549de5b8d6dcc7 (diff)
Makefile clean and entrypoint prettyness
Diffstat (limited to 'day01')
-rw-r--r--day01/Makefile5
-rwxr-xr-xday01/entrypoint7
2 files changed, 9 insertions, 3 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