From bd1ce2dad45b2ffa1f98443de7a9be5dac002999 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sat, 5 May 2012 23:51:59 -0400 Subject: [PATCH] Added support for %curver comment tag --- download.html | 2 +- tools/page-parse | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/download.html b/download.html index 82c6125..0f3ac4c 100644 --- a/download.html +++ b/download.html @@ -1,6 +1,6 @@

- Current Release: 0.1.0 + Current Release:

diff --git a/tools/page-parse b/tools/page-parse index e556d7a..c73e554 100755 --- a/tools/page-parse +++ b/tools/page-parse @@ -18,11 +18,15 @@ # along with this program. If not, see . ## -# currently, this only replaces %inc commands with the file contents +curver="$( git tag -l | tail -n1 )" + +# TODO: Both sed and gawk are unnecessary; it was just the most convenient +# solution gawk ' match( $0, /^ * *$/, arr ) { system( "cat " arr[1] ) next } { print } -' +' \ + | sed 's//'$curver'/g'