hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-09-18 12:16:44 +0200
committerhachem <im@hachem.wtf>2026-09-18 12:16:44 +0200
commitab2774b23c66521e13541ab3e361bba95c394a8a (patch)
tree8b06b5f2d15a2225f558202c9aaefd20dff8e6b4 /Makefile
feat: add paper template
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4512b74
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+NAME := mktypst
+VERSION := 0.1.0
+
+ifeq ($(shell uname),Darwin)
+DATADIR := $(HOME)/Library/Application Support
+else
+DATADIR := $(if $(XDG_DATA_HOME),$(XDG_DATA_HOME),$(HOME)/.local/share)
+endif
+
+PKGDIR := $(DATADIR)/typst/packages/local/$(NAME)/$(VERSION)
+
+install:
+ mkdir -p "$(PKGDIR)"
+ cp typst.toml lib.typ README.md LICENSE "$(PKGDIR)"/
+ cp -r templates "$(PKGDIR)"/
+
+uninstall:
+ rm -rf "$(DATADIR)/typst/packages/local/$(NAME)/$(VERSION)"
+
+.PHONY: install uninstall