-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (28 loc) · 754 Bytes
/
Makefile
File metadata and controls
35 lines (28 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
MD_PREPROCESSOR := sed -e 's/{DATE}/$(shell date '+%Y-%m-%d')/g'
LIBDIR := lib
include $(LIBDIR)/main.mk
$(LIBDIR)/main.mk:
ifneq (,$(shell git submodule status $(LIBDIR) 2>/dev/null))
git submodule sync
git submodule update $(CLONE_ARGS) --init
else
git clone -q --depth 10 $(CLONE_ARGS) \
-b main https://github.com/martinthomson/i-d-template $(LIBDIR)
endif
latest:: lint
.PHONY: lint
PYTHON := $(shell which python3)
ifeq ($(PYTHON),)
PYTHON := $(shell which python)
endif
ifneq ($(PYTHON),)
lint::
@$(PYTHON) ./.lint.py $(addsuffix .md,$(drafts))
endif
show-next:
@echo $(drafts_next)
ifneq ($(PYTHON),)
unescape::
@$(PYTHON) ./.unescape.py $(addsuffix .html,$(drafts))
@$(PYTHON) ./.unescape.py $(addsuffix .txt,$(drafts))
endif