Set emacs binary depending on the OS.

Only works with Linux and Darwin.
master
Stéphane Adjemian Argos) 2023-01-14 08:13:57 +01:00
parent 8e29ec169f
commit 0d8179e163
Signed by: stepan
GPG Key ID: A6D44CB9C64CE77B
1 changed files with 15 additions and 1 deletions

View File

@ -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>&lrm;<\/title>/d' ./output/index.html
sed -i '/<title>&lrm;<\/title>/d' ./output/research/index.html
sed -i '/<title>&lrm;<\/title>/d' ./output/posts/index.html