Mercurial > masqmail
annotate devel/update-manpage-date @ 392:c5fd796ea06e
Heavy refactoring in parts of conf.c.
init_conf()
parse_boolean()
parse_list_file()
Re-arrangement of code.
parse_address_glob_list()
Removed unneccessary parameter.
parse_list()
parse_interface():
Use strtok()/strchr() instead of doing is all by hand.
Removed limitation of fixed size buffer.
eat_comments()
Use a state machine.
eat_line_trailing()
eat_spaces()
read_lval()
Better structured code.
read_conf()
read_route()
Removed magic numbers.
Made all list type in the config files accept pathname entries,
except for `permanent_routes' and `query_routes.' for which this
is impossible.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Sat, 18 Feb 2012 18:07:55 +0100 |
parents | 7b70bf4f1f42 |
children |
rev | line source |
---|---|
182
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
1 #!/bin/sh |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
2 # |
0976977ccc52
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 |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
4 |
0976977ccc52
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 |
0976977ccc52
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 |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
7 exit 1 |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
8 fi |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
9 |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
10 |
0976977ccc52
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` |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
12 |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
13 version="$1" |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
14 shift |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
15 |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
16 for i do |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
17 ed -s "$i" <<! |
0976977ccc52
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# |
0976977ccc52
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# |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
20 p |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
21 w |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
22 q |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
23 ! |
0976977ccc52
added a development helper script to update the date and version in man pages
meillo@marmaro.de
parents:
diff
changeset
|
24 done |