1
0
Fork 0

Added publish target to Makefile

website
Mike Gerwitz 2012-01-07 22:56:49 -05:00
parent 9d6ea6d5d5
commit 59a7f24018
1 changed files with 7 additions and 1 deletions

View File

@ -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/\(<body\)/\1 class="blog"/' \
> "$(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