Added publish target to Makefile
parent
9d6ea6d5d5
commit
59a7f24018
8
Makefile
8
Makefile
|
@ -13,7 +13,7 @@ output_html := $(addprefix $(outdir)/, $(input_html))
|
||||||
output_images := $(addprefix $(outdir)/, $(input_images))
|
output_images := $(addprefix $(outdir)/, $(input_images))
|
||||||
output_scripts := $(addprefix $(outdir)/, $(input_scripts))
|
output_scripts := $(addprefix $(outdir)/, $(input_scripts))
|
||||||
|
|
||||||
.PHONY: default clean blog
|
.PHONY: default clean blog publish
|
||||||
|
|
||||||
default: $(outdir) $(output_html) $(output_images) \
|
default: $(outdir) $(output_html) $(output_images) \
|
||||||
$(output_scripts) $(outdir)/style.css
|
$(output_scripts) $(outdir)/style.css
|
||||||
|
@ -49,5 +49,11 @@ blog:
|
||||||
| sed 's/\(<body\)/\1 class="blog"/' \
|
| sed 's/\(<body\)/\1 class="blog"/' \
|
||||||
> "$(outdir)/blog.html"
|
> "$(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:
|
clean:
|
||||||
${RM} -r webroot
|
${RM} -r webroot
|
||||||
|
|
Loading…
Reference in New Issue