Mercurial > masqmail
view misc/update-manpage-date @ 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 (2010-07-14) |
parents | |
children |
line wrap: on
line source
#!/bin/sh # # update the date and version of man pages if [ $# -lt 2 ] ; then echo "usage: update-manpage-header VERSION FILES..." >&2 exit 1 fi date=`date +%Y-%m-%d` version="$1" shift for i do ed -s "$i" <<! /^\.TH/s#[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}#$date# s#[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}#$version# p w q ! done