annotate misc/update-manpage-date @ 173:a2bec9a14324

updated date and version in man pages
author meillo@marmaro.de
date Fri, 23 Jul 2010 10:15:49 +0200 (2010-07-23)
parents d56914eb9f75
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
157
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
1 #!/bin/sh
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
2 #
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
3 # update the date and version of man pages
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
4
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
5 if [ $# -lt 2 ] ; then
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
6 echo "usage: update-manpage-header VERSION FILES..." >&2
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
7 exit 1
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
8 fi
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
9
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
10
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
11 date=`date +%Y-%m-%d`
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
12
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
13 version="$1"
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
14 shift
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
15
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
16 for i do
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
17 ed -s "$i" <<!
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
18 /^\.TH/s#[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}#$date#
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
19 s#[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}#$version#
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
20 p
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
21 w
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
22 q
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
23 !
d56914eb9f75 added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff changeset
24 done