summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-10-27 14:24:28 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-10-27 14:24:28 -0700
commitdf762b986c5fdf80dda6768020f3c710aae9fc6e (patch)
tree1d830fcc03e56a7abe9de48513d5f27d1f29d2c2 /Makefile
parent388b70aac60e9058e86ab922ab95d254e9f64a7b (diff)
Removed the pesky dates.
Closes #175. Eventually I'll write a better build script and include these.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index bba04dd..a5bc1af 100644
--- a/Makefile
+++ b/Makefile
@@ -91,10 +91,11 @@ fuzztest:
_site/spec.html: spec.txt
(echo "% CommonMark Spec\n";\
- for vers in $(shell cd _site; ls -d -t 0.*) ; do \
- perl -pie 's/<div id="watermark"><\/div>/<div id="watermark" style="background-color:black">This is an older version of the spec. For the most recent version, see <a href="http:\/\/spec.commonmark.org">http:\/\/spec.commonmark.org<\/a>.<\/div>/' _site/$$vers/index.html ; \
- date=`stat -t "%Y-%m-%d" -f "%Sa" _site/$$vers/index.html`; \
- echo "- [Version $$vers ($$date)](/$$vers/)" ; \
+ for vers in $(shell cd _site; ls -d -1 0.* | sort -r -g) ; do \
+ if [ "$$vers" != "$(SPECVERSION)" ]; then \
+ perl -p -i -e 's/<div id="watermark">.*?<\/div>/<div id="watermark" style="background-color:black">This is an older version of the spec. For the most recent version, see <a href="http:\/\/spec.commonmark.org">http:\/\/spec.commonmark.org<\/a>.<\/div>/' _site/$$vers/index.html ; \
+ fi; \
+ echo "- [Version $$vers](/$$vers/)" ; \
done) | \
pandoc --template template.html -S -s -t html5 -o $@