summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororangerot <orangerot@orangerot.dev>2025-09-11 20:04:13 +0200
committerorangerot <orangerot@orangerot.dev>2025-09-11 20:04:13 +0200
commitdc49755cb6b596dd57ac1bfa9a8d33174d22102f (patch)
tree46d672c448b0ebbb4422db0e23960032707f13a4
parent73467ecd31e34096e1ac1f7968e39e6151701f9a (diff)
feat: Makefile to build distributable archives for each template
-rw-r--r--.gitignore2
-rw-r--r--Makefile21
-rw-r--r--muendliche-pruefung-mathematik/README.md6
-rw-r--r--muendliche-pruefung-mathematik/lib.typ2
-rw-r--r--muendliche-pruefung-mathematik/muendliche-pruefung-mathematik.typ (renamed from muendliche-pruefung-mathematik/muendliche-pruefung.typ)0
5 files changed, 27 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 5099d97..496927f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,5 @@
# SPDX-License-Identifier: MIT
*.pdf
+*.tar.gz
+
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0d3c356
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+# SPDX-FileCopyrightText: 2025 Gero Beckmann <orangerot@orangerot.dev>
+#
+# SPDX-License-Identifier: MIT
+
+TEMPLATES = muendliche-pruefung muendliche-nachpruefung muendliche-pruefung-mathematik
+FILES = README.md main.typ lib.typ $1.typ $1.pdf
+
+dist: $(addsuffix .tar.gz,${TEMPLATES})
+ mkdir -p dist
+ mv $^ dist
+
+define make-archive
+$1.tar.gz: $(addprefix $1/,${FILES})
+ tar -vczf $1.tar.gz $$^
+endef
+
+%.pdf: %.typ
+ typst compile $^
+
+$(foreach template,${TEMPLATES},$(eval $(call make-archive,${template})))
+
diff --git a/muendliche-pruefung-mathematik/README.md b/muendliche-pruefung-mathematik/README.md
index ca0df6d..f1d6a76 100644
--- a/muendliche-pruefung-mathematik/README.md
+++ b/muendliche-pruefung-mathematik/README.md
@@ -87,9 +87,9 @@ typst compile main.typ
```
Für Personen, welche in die Struktur des Dokuments eintauchen wollen gibt es die
-Datei `muendliche-pruefung.typ`. Diese ist der Inspiration in TeX vom Aufbau
-ähnlich. Das befüllen des Fragebogens ist hier etwas schwerer, weil erst die
-richtige Stelle im Code gefunden werden muss.
+Datei `muendliche-pruefung-mathematik.typ`. Diese ist der Inspiration in TeX vom
+Aufbau ähnlich. Das befüllen des Fragebogens ist hier etwas schwerer, weil erst
+die richtige Stelle im Code gefunden werden muss.
Um die Änderungen direkt beim Speichern zu sehen, kann man folgenden Befehl
nutzen:
diff --git a/muendliche-pruefung-mathematik/lib.typ b/muendliche-pruefung-mathematik/lib.typ
index cb9cada..57ec323 100644
--- a/muendliche-pruefung-mathematik/lib.typ
+++ b/muendliche-pruefung-mathematik/lib.typ
@@ -109,7 +109,7 @@
#checkbox(checked: checked_knowledge_gaps == false) nein
]
- #include "muendliche-pruefung.typ"
+ #include "muendliche-pruefung-mathematik.typ"
#doc
]
diff --git a/muendliche-pruefung-mathematik/muendliche-pruefung.typ b/muendliche-pruefung-mathematik/muendliche-pruefung-mathematik.typ
index fceb0ff..fceb0ff 100644
--- a/muendliche-pruefung-mathematik/muendliche-pruefung.typ
+++ b/muendliche-pruefung-mathematik/muendliche-pruefung-mathematik.typ