Generate version and date in man pages

This commit is contained in:
Miroslav Lichvar
2011-06-24 12:30:48 +02:00
parent 40d33cc64d
commit 1cb8167be0
5 changed files with 14 additions and 12 deletions

View File

@@ -1,5 +1,8 @@
#!/bin/sh
LANG=C
export LANG
if [ $# -ne 1 ]; then
echo "Usage : $0 <version>"
exit 2
@@ -7,6 +10,7 @@ fi
version=$1
subdir=chrony-${version}
mandate=$(date +'%B %Y')
umask 022
@@ -30,6 +34,12 @@ echo $version > version.txt
sed -e "s%@@VERSION@@%${version}%" < chrony.spec.sample > chrony.spec
for m in chrony.1 chronyc.1 chrony.conf.5 chronyd.8; do
sed -e "s%@VERSION@%${version}%;s%@MAN_DATE@%${mandate}%" \
< $m > ${m}_
mv -f ${m}_ $m
done
makeinfo --no-headers --number-sections -o chrony.txt chrony.texi
rm -f make_release chrony.spec.sample .gitignore