masqmail

diff devel/update-manpage-date @ 226:7b70bf4f1f42

renamed misc/ to devel/ because the contents are for developers
author meillo@marmaro.de
date Fri, 23 Jul 2010 11:46:08 +0200
parents misc/update-manpage-date@0976977ccc52
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/devel/update-manpage-date	Fri Jul 23 11:46:08 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