From bd95b469f9db3e08c81ea66c355e9708bb6d5ae5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 3 Nov 2014 17:46:14 -0800 Subject: Made make_site_index.sh more robust. --- make_site_index.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'make_site_index.sh') 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 '
' $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 '
' $SITE/$vers/index.html | perl -pe 's/^.*(\d\d\d\d-\d\d-\d\d).*$/\1/'` -- cgit v1.2.3