aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Dockerfile2
-rw-r--r--Makefile18
3 files changed, 13 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 3a108ac..effbf03 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
+/.satysfi
/slide.pdf
/slide.satysfi-aux
diff --git a/Dockerfile b/Dockerfile
index 0cbb1ff..e73579a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -9,6 +9,6 @@ RUN opam install satysfi-class-slydifi && \
opam install satysfi-fonts-noto-sans-cjk-jp
RUN eval $(opam env) && \
- satyrographos install
+ satyrographos install --copy
WORKDIR /work
diff --git a/Makefile b/Makefile
index 0c4c2cc..1d3a193 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+SATYSFI_BIN := satysfi
+
.PHONY: all
all: build
@@ -6,12 +8,7 @@ all: build
build: slide.pdf
slide.pdf: slide.saty
- docker run \
- --rm \
- --name satysfi \
- --mount type=bind,src=$$(pwd),dst=/work \
- satysfi \
- sh -c "satysfi slide.saty && chown "$$(id -u):$$(id -g)" slide.pdf slide.satysfi-aux"
+ $(SATYSFI_BIN) $^
# Enter Docker shell.
.PHONY: shell
@@ -20,7 +17,6 @@ shell:
-it \
--rm \
--name satysfi \
- --mount type=bind,src=$$(pwd),dst=/work \
satysfi \
sh
@@ -29,6 +25,14 @@ shell:
docker:
docker build --tag satysfi .
+# Install dependencies.
+.PHONY: deps
+deps:
+ rm -rf .satysfi
+ docker create --name satysfi-tmp satysfi
+ docker cp -L satysfi-tmp:/root/.satysfi .satysfi
+ docker rm satysfi-tmp
+
# Clean all artifacts.
.PHONY: clean
clean: