File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
- EMACS_INIT := ~ /.emacs.d/init.el
1
+ EMACS_INIT := /root /.emacs.d/init.el
2
2
EMACS_LOAD := -l $(EMACS_INIT )
3
3
EMACS_FLAGS := --batch --kill $(EMACS_LOAD )
4
4
ORG_FILES := $(wildcard * .org)
5
5
HTML_FILES := $(patsubst % .org, % .html, $(ORG_FILES ) )
6
+ DOCKER_IMG := ryukinix/lerax
7
+ USER := $(shell id -u) :$(shell id -g)
8
+ DOCKER_RUN := docker run -w /tmp \
9
+ -v $(shell pwd) :/tmp \
10
+ --rm \
11
+ -t
12
+ STATUS_PREFIX := "\033[1;32m[+]\033[0m "
13
+ ATTENTION_PREFIX := "\033[1;36m[!]\033[0m "
6
14
7
- .PHONY : clean
15
+ .PHONY : clean shell
8
16
9
17
all : $(HTML_FILES )
10
18
19
+ shell :
20
+ $(DOCKER_RUN ) -i --entrypoint=/bin/zsh $(DOCKER_IMG )
21
+
11
22
% .html : % .org
12
- emacs $< $(EMACS_FLAGS ) -f org-html-export-to-html
23
+ @printf $(STATUS_PREFIX ) ; echo " COMPILING: $< -> $* .html"
24
+ @$(DOCKER_RUN ) $(DOCKER_IMG ) $< $(EMACS_FLAGS ) -f org-html-export-to-html
25
+ @$(DOCKER_RUN ) --entrypoint=/bin/chown $(DOCKER_IMG ) $(USER ) " $* .org"
13
26
14
27
clean :
15
28
rm -rf * .html
You can’t perform that action at this time.
0 commit comments