switches to markdown
[thefekete.net.git] / Makefile
1 M=$(wildcard *.md)
2 H=$(patsubst %.md,%.html,$M)
3
4 all: $H
5
6 %.html: %.md
7 markdown $< >$@
8
9 view:
10 xdg-open index.html
11
12 publish: all
13 @git diff-index --quiet HEAD -- && test -z "$(git ls-files --others)" || ( \
14 1>&2 echo "Index is dirty or there are uncommitted files!"; \
15 git status; \
16 exit 1; \
17 )
18 git archive --format=tgz HEAD \
19 | ssh root@thefekete.net "cd /var/www/thefekete.net && tar zxvf -"
20
21 clean:
22 rm -f $H
23
24 .PHONY: all publish view clean