diff --git a/Makefile b/Makefile index a68bcad..1e7bf65 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,22 @@ all: publish assets clean +OS := $(shell uname -s) +ARCH := $(shell uname -p) + +ifeq ($(OS), Linux) + EMACS=emacs +endif +ifeq ($(OS),Darwin) + ifeq ($(ARCH), arm) + EMACS=/opt/homebrew/bin/emacs + else + EMACS=/usr/local/opt/emacs + endif +endif + publish: - @emacs --batch --no-init --load publish.el --funcall org-publish-all + @EMACS --batch --no-init --load publish.el --funcall org-publish-all sed -i '/‎<\/title>/d' ./output/index.html sed -i '/<title>‎<\/title>/d' ./output/research/index.html sed -i '/<title>‎<\/title>/d' ./output/posts/index.html