# HG changeset patch # User Heiko Schlittermann (JUMPER) # Date 1429681305 -7200 # Node ID 5ec46ef9fd4bf707667123c19c23fbad6ad52ba9 # Parent 7636474710393b4b70503eb59d18c8c23a142eb8 Add URL and publish method diff -r 763647471039 -r 5ec46ef9fd4b Makefile --- a/Makefile Tue Apr 21 22:15:22 2015 +0200 +++ b/Makefile Wed Apr 22 07:41:45 2015 +0200 @@ -1,27 +1,38 @@ -TXT = short.txt -HTML = out/short.html -PDF = out/short.pdf +TXT = short.txt # INPUT -#REVISION = ${shell hg id -tibB} -REVISION = ${shell hg log -r . --template '{latesttag}-{latesttagdistance}-{node|short}'} +HTML = out/short.html # OUTPUT +PDF = out/short.pdf # OUTPUT + DATE = ${shell date -I} +ifeq (${wildcard .hg_archival.txt}, .hg_archival.txt) + REVISION = ${shell grep ^latesttag: .hg_archival.txt|cut -f2 -d' '} +else + REVISION = ${shell hg log -r . --template '{latesttag}-{latesttagdistance}-{node|short}'} +endif + +# Flags for asciidoc AOPTS = -a revision="${REVISION}" -a date="${DATE}" .PHONY: all clean pdf html all: html pdf -clean: ; rm -f ${HTML} ${PDF} +clean: +distclean: clean; rm -r out pdf: ${PDF} html: ${HTML} out/%.pdf: %.txt $(MAKEFILE_LIST) short.conf @mkdir -p ${dir $@} - a2x -k --asciidoc-opts="${AOPTS}" -D ${dir $@} $< + a2x --asciidoc-opts="${AOPTS}" -D ${dir $@} $< out/%.html: %.txt $(MAKEFILE_LIST) short.conf @mkdir -p ${dir $@} -# asciidoc -a revision="${REVISION}" -a date="${DATE}" -o $@ $< asciidoc ${AOPTS} -o $@ $< + +publish: all + cd out \ + && /bin/echo -e 'progress\nput *' \ + | sftp -b - 'www.schlittermann.de@www.schlittermann.de:htdocs/doc/Exim_(de)/' diff -r 763647471039 -r 5ec46ef9fd4b short.txt --- a/short.txt Tue Apr 21 22:15:22 2015 +0200 +++ b/short.txt Wed Apr 22 07:41:45 2015 +0200 @@ -7,7 +7,9 @@ :numbered: :ascii-ids: -Die Quelle dieses Dokuments ist: https://ssl.schlittermann.de/hg/doc/exim +Die Quelle dieses Dokuments ist: https://ssl.schlittermann.de/hg/doc/exim, es +gibt auch eine http://schlittermann.de/doc/Exim_(de)/short.html[HTML] und eine +http://schlittermann.de/doc/Exim_(de)/short.pdf[PDF] Version. //// _italic_::