-
Notifications
You must be signed in to change notification settings - Fork 173
/
Makefile
64 lines (54 loc) · 1.74 KB
/
Makefile
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
BUILD_DIR = build
OBSIDIAN_DIR = $(BUILD_DIR)/obsidian
TYPORA_DIR = $(BUILD_DIR)/typora
VSCODE_DIR = $(BUILD_DIR)/vscode
OBSIDIAN_TEMPLATE_DIR = templates/obsidian/
TYPORA_TEMPLATE_DIR = templates/typora/
VSCODE_TEMPLATE_DIR = templates/vscode/
OBSIDIAN_FILES = styles/font.css $(OBSIDIAN_DIR)/.obsidian/snippets/lapiscv-font.css \
styles/obsidian.css $(OBSIDIAN_DIR)/.obsidian/snippets/lapiscv-obsidian.css \
styles/main.css $(OBSIDIAN_DIR)/.obsidian/snippets/lapiscv-main.css
TYPORA_FILES = styles/typora.css $(TYPORA_DIR)/lapis-cv.css \
styles/main.css $(TYPORA_DIR)/lapis-cv/styles/main.css \
styles/font.css $(TYPORA_DIR)/lapis-cv/styles/font.css
VSCODE_FILES = styles/vscode.css $(VSCODE_DIR)/lapis-cv/styles/vscode.css \
styles/main.css $(VSCODE_DIR)/lapis-cv/styles/main.css \
styles/font.css $(VSCODE_DIR)/lapis-cv/styles/font.css
all: obsidian typora vscode
obsidian:
@mkdir -p $(OBSIDIAN_DIR)
@cp -r $(OBSIDIAN_TEMPLATE_DIR). $(OBSIDIAN_DIR)
@set -- $(OBSIDIAN_FILES); \
while [ "$$#" -gt 0 ]; do \
src=$$1; \
dest=$$2; \
mkdir -p $$(dirname $$dest); \
cp -r $$src $$dest; \
shift 2; \
done
typora:
@mkdir -p $(TYPORA_DIR)
@cp -r $(TYPORA_TEMPLATE_DIR). $(TYPORA_DIR)
@set -- $(TYPORA_FILES); \
while [ "$$#" -gt 0 ]; do \
src=$$1; \
dest=$$2; \
mkdir -p $$(dirname $$dest); \
cp -r $$src $$dest; \
shift 2; \
done
vscode:
@mkdir -p $(VSCODE_DIR)
@cp -r $(VSCODE_TEMPLATE_DIR). $(VSCODE_DIR)
@set -- $(VSCODE_FILES); \
while [ "$$#" -gt 0 ]; do \
src=$$1; \
dest=$$2; \
mkdir -p $$(dirname $$dest); \
cp -r $$src $$dest; \
shift 2; \
done
clean:
@echo "Cleaning $(BUILD_DIR)..."
@rm -rf $(BUILD_DIR)
.PHONY: all obsidian typora vscode clean