From 59a7f2401815d0bd63ef42d0e6be9fa6d73e7e38 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sat, 7 Jan 2012 22:56:49 -0500 Subject: [PATCH] Added publish target to Makefile --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1ceaa3a..81b83a2 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ output_html := $(addprefix $(outdir)/, $(input_html)) output_images := $(addprefix $(outdir)/, $(input_images)) output_scripts := $(addprefix $(outdir)/, $(input_scripts)) -.PHONY: default clean blog +.PHONY: default clean blog publish default: $(outdir) $(output_html) $(output_images) \ $(output_scripts) $(outdir)/style.css @@ -49,5 +49,11 @@ blog: | sed 's/\( "$(outdir)/blog.html" +# publish webroot to remote server using rsync (do not delete files, since we +# may not have built everything) +publish: | default + @[ -n "$(PUBURL)" ] || ( echo "PUBURL not set; aborting." >&2 && false ) + rsync -vr $(outdir)/./* "$(PUBURL)" + clean: ${RM} -r webroot