masqmail
annotate devel/update-manpage-date @ 421:f37384470855
Changed lockdir to /var/lock/masqmail; Create lockdir and piddir on startup.
Moved the lockdir out of the spool dir. (When /var/lock is a ramdisk
we do well to have the lock files there.) Added the new configure option
--with-lockdir to change that location. Nontheless, if we run_as_user,
then lock files are always stored in the spool dir directly.
Instead of installing the lockdir and piddir at installation time, we
create them on startup time now if they are missing. This is necessary
if lockdir or piddir are a tmpfs.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Wed, 30 May 2012 09:38:38 +0200 |
parents | 0976977ccc52 |
children |
rev | line source |
---|---|
meillo@182 | 1 #!/bin/sh |
meillo@182 | 2 # |
meillo@182 | 3 # update the date and version of man pages |
meillo@182 | 4 |
meillo@182 | 5 if [ $# -lt 2 ] ; then |
meillo@182 | 6 echo "usage: update-manpage-header VERSION FILES..." >&2 |
meillo@182 | 7 exit 1 |
meillo@182 | 8 fi |
meillo@182 | 9 |
meillo@182 | 10 |
meillo@182 | 11 date=`date +%Y-%m-%d` |
meillo@182 | 12 |
meillo@182 | 13 version="$1" |
meillo@182 | 14 shift |
meillo@182 | 15 |
meillo@182 | 16 for i do |
meillo@182 | 17 ed -s "$i" <<! |
meillo@182 | 18 /^\.TH/s#[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}#$date# |
meillo@182 | 19 s#[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}#$version# |
meillo@182 | 20 p |
meillo@182 | 21 w |
meillo@182 | 22 q |
meillo@182 | 23 ! |
meillo@182 | 24 done |