-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (26 loc) · 799 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (26 loc) · 799 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
include env.make
SPOON=AnkiShortcuts
default: Spoons/$(SPOON).spoon.zip
.PHONY: clean docs reinstall
clean:
rm -f Spoons/$(SPOON).spoon.zip
Spoons/$(SPOON).spoon.zip: docs Source/$(SPOON).spoon
rm -f Spoons/$(SPOON).spoon.zip
cd Source ; /usr/bin/zip -9 -r ../Spoons/$(SPOON).spoon.zip $(SPOON).spoon
docs:
mkdir -p .docs_tmp
$(HAMMERSPOON_REPO)/scripts/docs/bin/build_docs.py \
--templates doc_templates \
--output_dir .docs_tmp \
--json \
--markdown \
--standalone \
Source
cat .docs_tmp/markdown/$(SPOON).md .docs_tmp/markdown/index.md > README.md
mv .docs_tmp/docs.json Source/$(SPOON).spoon/
rm -rf .docs_tmp
reinstall: default
mkdir -p .install_tmp
/usr/bin/unzip Spoons/$(SPOON).spoon.zip -d .install_tmp
open .install_tmp/$(SPOON).spoon
rm -rf .install_tmp