Mercurial > masqmail
comparison 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 |
comparison
equal
deleted
inserted
replaced
225:589c365d90b1 | 226:7b70bf4f1f42 |
---|---|
1 #!/bin/sh | |
2 # | |
3 # update the date and version of man pages | |
4 | |
5 if [ $# -lt 2 ] ; then | |
6 echo "usage: update-manpage-header VERSION FILES..." >&2 | |
7 exit 1 | |
8 fi | |
9 | |
10 | |
11 date=`date +%Y-%m-%d` | |
12 | |
13 version="$1" | |
14 shift | |
15 | |
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 |