masqmail-0.2
annotate misc/update-manpage-date @ 190:fbb3417c1a54
Minor fixes in man pages, reported by lintian(1)
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Mon, 29 Aug 2011 19:22:51 +0200 |
parents | |
children |
rev | line source |
---|---|
meillo@157 | 1 #!/bin/sh |
meillo@157 | 2 # |
meillo@157 | 3 # update the date and version of man pages |
meillo@157 | 4 |
meillo@157 | 5 if [ $# -lt 2 ] ; then |
meillo@157 | 6 echo "usage: update-manpage-header VERSION FILES..." >&2 |
meillo@157 | 7 exit 1 |
meillo@157 | 8 fi |
meillo@157 | 9 |
meillo@157 | 10 |
meillo@157 | 11 date=`date +%Y-%m-%d` |
meillo@157 | 12 |
meillo@157 | 13 version="$1" |
meillo@157 | 14 shift |
meillo@157 | 15 |
meillo@157 | 16 for i do |
meillo@157 | 17 ed -s "$i" <<! |
meillo@157 | 18 /^\.TH/s#[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}#$date# |
meillo@157 | 19 s#[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}#$version# |
meillo@157 | 20 p |
meillo@157 | 21 w |
meillo@157 | 22 q |
meillo@157 | 23 ! |
meillo@157 | 24 done |