summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-03 17:46:14 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-03 17:46:14 -0800
commitbd95b469f9db3e08c81ea66c355e9708bb6d5ae5 (patch)
tree61f53c1a60f1ebb7c088a106c9965163693b8870
parent23f9cdb763c31bec0ccc722408cfe12a9b0da1af (diff)
Made make_site_index.sh more robust.
-rwxr-xr-xmake_site_index.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/make_site_index.sh b/make_site_index.sh
index d11dbe0..8a00018 100755
--- a/make_site_index.sh
+++ b/make_site_index.sh
@@ -4,13 +4,17 @@ SPECVERSION=$1
SITE=_site
VERSIONS=`cd $SITE; ls -d -1 0.* | sort -r -g`
-echo "% CommonMark Spec\n"
+echo "% CommonMark Spec"
+echo ""
date=`grep '<div class="version">' $SITE/$SPECVERSION/index.html | perl -pe 's/^.*(\d\d\d\d-\d\d-\d\d).*$/\1/'`
-echo "[**Latest version ($SPECVERSION)**](/$SPECVERSION/) ($date)\n"
+echo "[**Latest version ($SPECVERSION)**](/$SPECVERSION/) ($date)"
+echo ""
echo "[discussion forum](http://talk.commonmark.org/) | "
echo "[interactive dingus](/dingus.html) | "
-echo "[repository](https://github.com/jgm/CommonMark/)\n"
-echo "Older versions:\n"
+echo "[repository](https://github.com/jgm/CommonMark/)"
+echo ""
+echo "Older versions:"
+echo ""
for vers in $VERSIONS
do
date=`grep '<div class="version">' $SITE/$vers/index.html | perl -pe 's/^.*(\d\d\d\d-\d\d-\d\d).*$/\1/'`