]> git.sur5r.net Git - bacula/docs/blob - docs/update_version
Update version and correct coverpage
[bacula/docs] / docs / update_version
1 #!/bin/sh
2 #
3 # Script file to update the Bacula version
4 #  It only needs to be run once for each version.
5 #  Alternatively, you can simply edit the file
6 #   manuals/version.tex and put the correct version and date
7 #   in that file.
8 # The only thing this script does is to create the file:
9 #   manuals/version.tex which contains the VERSION and the DATE
10 #   on a single line.
11 #
12 BACULA_SOURCE=$HOME/bee/bacula/bacula/src
13 out=/tmp/$$
14 VERSION=`sed -n -e 's/^#define VERSION.*"\(.*\)"$/\1/p' ${BACULA_SOURCE}/version.h`
15 DATE=`sed -n -e 's/^#define BDATE.*"\(.*\)"$/\1/p' ${BACULA_SOURCE}/version.h`
16 echo "New version=${VERSION}  New date=${DATE}"
17 echo "s%@VERSION@%${VERSION}%g" >${out}
18 echo "s%@DATE@%${DATE}%g" >>${out}
19 sed -f ${out} manuals/version.tex.in >manuals/version.tex
20 sed -f ${out} manuals/bacula.sty.in >manuals/bacula.sty
21 rm -f ${out}
22 echo "Updated version to:"
23 cat manuals/version.tex