File: update_version

package info (click to toggle)
bacula-doc 15.0.3%2Bdebian1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 45,036 kB
  • sloc: perl: 908; makefile: 684; javascript: 182; sh: 67
file content (19 lines) | stat: -rwxr-xr-x 743 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
#!/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=${bacula:-$HOME/bee/bacula}/bacula/src
VERSIONH=${versionh:-${BACULA_SOURCE}/version.h}
VERSIONTEX=${versiontex:-latex/version.tex}
VERSION=`sed -n -e 's/^#define VERSION.*"\(.*\)"$/\1/p' ${VERSIONH}`
DATE=`sed -n -e 's/^#define BDATE.*"\(.*\)"$/\1/p' ${VERSIONH}`
echo "${VERSION} (${DATE})" >${VERSIONTEX}
echo "Updated version to:"
cat ${VERSIONTEX}