-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
32 lines (27 loc) · 1.02 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
TEMPLATE=src/lyagtd.template
SRC=src/lyagtd.markdown
TARGET=build/index.html
$(TARGET): build/lyagtd.css build/bootstrap.min.css $(SRC) build/images src/lyagtd.template
cat $(SRC)\
| gsed ':a;N;$$!ba;s/@@\([^@]*\)@@/<span class="listname">\1<\/span>/g'\
| gsed ':a;N;$$!ba;s/\^\^\([^\^]*\)\^\^/<span class="action">\1<\/span>/g'\
| gsed ':a;N;$$!ba;s/!!\([^!]*\)!!/<span class="context">\1<\/span>/g'\
| gsed ':a;N;$$!ba;s/~~\([^~]*\)~~/<span class="calendar">\1<\/span>/g'\
| pandoc -f markdown+smart -s --toc --template=$(TEMPLATE) \
-c /gtd/bootstrap.min.css \
-c /gtd/lyagtd.css \
-o $(TARGET)
build/images: images
mkdir -p build/images
cp -R images/* build/images
build/lyagtd.css:
mkdir -p build
cp src/lyagtd.css build/lyagtd.css
build/bootstrap.min.css:
mkdir -p build
cp src/bootstrap.min.css build/bootstrap.min.css
deploy: $(TARGET)
aws --profile hamberg.no s3 sync build s3://hamberg.no/gtd/
aws --profile hamberg.no cloudfront create-invalidation \
--distribution-id EINNQNCHBL80C \
--paths /gtd '/gtd/*'