File: update_version

package info (click to toggle)
bacula-doc 9.4.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 236,792 kB
  • sloc: makefile: 1,820; perl: 937; sh: 218
file content (23 lines) | stat: -rwxr-xr-x 892 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
#
# Script file to update the Bacula version
#  It only needs to be run once for each version.
#  Alternatively, you can simply edit the file
#   manuals/version.tex and put the correct version and date
#   in that file.
# The only thing this script does is to create the file:
#   manuals/version.tex which contains the VERSION and the DATE
#   on a single line.
#
BACULA_SOURCE=$HOME/bacula/k/bacula/src
out=/tmp/$$
VERSION=`sed -n -e 's/^#define VERSION.*"\(.*\)"$/\1/p' ${BACULA_SOURCE}/version.h`
DATE=`sed -n -e 's/^#define BDATE.*"\(.*\)"$/\1/p' ${BACULA_SOURCE}/version.h`
echo "New version=${VERSION}  New date=${DATE}"
echo "s%@VERSION@%${VERSION}%g" >${out}
echo "s%@DATE@%${DATE}%g" >>${out}
sed -f ${out} manuals/version.tex.in >manuals/version.tex
sed -f ${out} manuals/bacula.sty.in >manuals/bacula.sty
rm -f ${out}
echo "Updated version to:"
cat manuals/version.tex