Debian Codegraph @

update_version

raw
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=${bacula:-$HOME/bee/bacula}/bacula/src
13 VERSIONH=${versionh:-${BACULA_SOURCE}/version.h}
14 VERSIONTEX=${versiontex:-latex/version.tex}
15 VERSION=`sed -n -e 's/^#define VERSION.*"\(.*\)"$/\1/p' ${VERSIONH}`
16 DATE=`sed -n -e 's/^#define BDATE.*"\(.*\)"$/\1/p' ${VERSIONH}`
17 echo "${VERSION} (${DATE})" >${VERSIONTEX}
18 echo "Updated version to:"
19 cat ${VERSIONTEX}