masqmail
changeset 182:0976977ccc52
added a development helper script to update the date and version in man pages
author | meillo@marmaro.de |
---|---|
date | Wed, 14 Jul 2010 21:59:23 +0200 |
parents | 8b17ea9fd17b |
children | 6ff77c63e714 |
files | misc/update-manpage-date |
diffstat | 1 files changed, 24 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/misc/update-manpage-date Wed Jul 14 21:59:23 2010 +0200 1.3 @@ -0,0 +1,24 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# update the date and version of man pages 1.7 + 1.8 +if [ $# -lt 2 ] ; then 1.9 + echo "usage: update-manpage-header VERSION FILES..." >&2 1.10 + exit 1 1.11 +fi 1.12 + 1.13 + 1.14 +date=`date +%Y-%m-%d` 1.15 + 1.16 +version="$1" 1.17 +shift 1.18 + 1.19 +for i do 1.20 + ed -s "$i" <<! 1.21 +/^\.TH/s#[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}#$date# 1.22 +s#[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}#$version# 1.23 +p 1.24 +w 1.25 +q 1.26 +! 1.27 +done