]> git.sur5r.net Git - bacula/bacula/blob - bacula/release/makemanualsrel
2775cdc316529a7476c2aa85eb9ad871916d6b28
[bacula/bacula] / bacula / release / makemanualsrel
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6 # This script is used to make a Bacula manuals release
7 #   There are the html manuals and the pdf manuals.  Both
8 #   are made from the docs source release.
9 #
10 # It writes in the current directory, so we recommend that you
11 #  do not run it in the Bacula source or Git directory, but
12 #  in a special release directory.
13 #
14 # Commit all changes, export the release, make a release tar.
15 #
16 # source ./config
17 . ./config
18
19 cwd=`pwd`
20 ver=$1
21 tagbase=Release-
22 base_name=bacula
23 # from where we get out package files
24 base_pkg=${base_name}-docs
25 html_name=${base_name}-html-manuals-${ver}
26 pdf_name=${base_name}-pdf-manuals-${ver}
27
28 if [ $# != 1 ] ; then
29   echo "Need $0 <version>"
30   echo "e.g. $0 6.4.0"
31   exit 1
32 fi
33
34 rm -rf $base_pkg-$ver
35 echo "Detarring $base_pkg-$ver.tar.bz2"
36 tar xfj $base_pkg-$ver.tar.bz2 
37 cd $base_pkg-$ver/manuals/en
38 mkdir -p html pdf
39 for i in console developers main misc problems utility; do
40   cp -a $i/$i/ html/
41   cp $i/$i.pdf pdf/
42 done
43
44 # create index for bweb
45 ../../tools/create_index.pl main/main
46 cp ../../tools/index.html .
47
48 echo "Creating ${html_name}.tar.gz"
49 tar cfz ${html_name}.tar.gz html css js images index.html
50 echo "Creating ${pdf_name}.tar.gz"
51 tar cfz ${pdf_name}.tar.gz pdf
52
53 mv ${html_name}.tar.gz $cwd/
54 mv ${pdf_name}.tar.gz $cwd/
55
56 cd $cwd
57 # Remove detared docs directory
58 rm -rf $base_pkg-$ver ${html_name}.tar.gz.sig ${pdf_name}.tar.gz.sig
59 ./sign ${html_name}.tar.gz
60 ./sign ${pdf_name}.tar.gz
61 echo " "
62 echo "Done making html and pdf manuals"
63
64 exit 0