masqmail
view devel/update-manpage-date @ 284:4869321aa7bf
recognize the program name `newaliases' too
We still simply exit in this mode, but now we can create a link
called `newaliases' to masqmail instead of needing a script to
call `masqmail -bi'. `ln /bin/true /usr/bin/newaliases' would be
a fancy way too, but letting the MTA handle it is probably the
safer approach.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Tue, 07 Dec 2010 17:09:07 -0300 |
parents | 0976977ccc52 |
children |
line source
1 #!/bin/sh
2 #
3 # update the date and version of man pages
5 if [ $# -lt 2 ] ; then
6 echo "usage: update-manpage-header VERSION FILES..." >&2
7 exit 1
8 fi
11 date=`date +%Y-%m-%d`
13 version="$1"
14 shift
16 for i do
17 ed -s "$i" <<!
18 /^\.TH/s#[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}#$date#
19 s#[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}#$version#
20 p
21 w
22 q
23 !
24 done