From 11758aaf4b05fed1e784be802fe8f3396547ce57 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 10 Dec 2012 21:43:48 -0500 Subject: Automate building and publishing. Make sucks, but it beats a bunch of shell scripts. --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e343c64 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +WEB_HOST ?= alchemy.grimoire.ca +WEB_ROOT ?= /var/www/grimoire.ca + +BROWSER ?= open + +.html: clean + markdoc build + +.PHONY: html +html: .html + +.PHONY: clean +clean: + $(RM) -r .html + $(RM) -r .tmp + +.PHONY: publish +publish: html + rsync -zav --delete-after .html/ $(WEB_HOST):$(WEB_ROOT) + +.PHONY: open +open: html + $(BROWSER) .html/index.html -- cgit v1.2.3