aboutsummaryrefslogtreecommitdiff
path: root/day02
diff options
context:
space:
mode:
Diffstat (limited to 'day02')
-rw-r--r--day02/Makefile5
-rwxr-xr-xday02/entrypoint7
2 files changed, 9 insertions, 3 deletions
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