aboutsummaryrefslogtreecommitdiff
path: root/skel
diff options
context:
space:
mode:
Diffstat (limited to 'skel')
-rw-r--r--skel/Dockerfile7
-rw-r--r--skel/Makefile10
-rwxr-xr-xskel/entrypoint10
-rw-r--r--skel/input0
-rwxr-xr-xskel/part13
5 files changed, 30 insertions, 0 deletions
diff --git a/skel/Dockerfile b/skel/Dockerfile
new file mode 100644
index 0000000..5e0a8b7
--- /dev/null
+++ b/skel/Dockerfile
@@ -0,0 +1,7 @@
+FROM ruby:2.5-slim
+
+WORKDIR /opt
+
+COPY . .
+
+ENTRYPOINT ["./entrypoint"]
diff --git a/skel/Makefile b/skel/Makefile
new file mode 100644
index 0000000..1bc4310
--- /dev/null
+++ b/skel/Makefile
@@ -0,0 +1,10 @@
+DAY =
+
+.PHONY: run
+
+run: build
+ sudo docker run -it --rm aoc2018day$(DAY)
+
+build:
+ sudo docker build -t aoc2018day$(DAY) .
+ touch build
diff --git a/skel/entrypoint b/skel/entrypoint
new file mode 100755
index 0000000..cff9f4c
--- /dev/null
+++ b/skel/entrypoint
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if [ -x part1 ] ; then
+ echo -ne "Part 1:\n\t"
+ ./part1 < input
+fi
+if [ -x part2 ] ; then
+ echo -ne "Part 2:\n\t"
+ ./part2 < input
+fi
diff --git a/skel/input b/skel/input
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/skel/input
diff --git a/skel/part1 b/skel/part1
new file mode 100755
index 0000000..90c685a
--- /dev/null
+++ b/skel/part1
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+
+input = $stdin.readlines.map(&:chomp)