]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/setup
Add changes
[bacula/bacula] / regress / scripts / setup
1 #!/bin/sh
2 #
3 # Script to setup running Bacula regression tests
4 #
5 cwd=`pwd`
6 if [ $# != 4 ] ; then
7    echo "Incorrect number of arguments. Got $#. Need:"
8    echo "setup bacula-src email-address --with-DBNAME --with-tcp-wrappers"
9    echo " "
10    exit 1
11 fi
12 if [ ! -d $1 ] ; then
13    echo "Arg 1 must be a Bacula release directory."
14    echo " "
15    exit 1
16 fi
17 rm -rf build bin
18 # Copy new source
19 echo "Copying source from $1"
20 cp -rp $1 build
21 cp scripts/regress-config build
22 cd build
23 rm -f Makefile config.cache
24 # Remove files that may be too big
25 cd doc
26 if [ -d latex ] ; then
27    cd latex
28    make clean
29    cd ..
30 fi
31 if [ -d latex-fr ] ; then
32    cd latex-fr
33    make clean
34    cd ..
35 fi
36 if [ -d images ] ; then
37    cd images
38    rm -f *.png *.jpg *.gif *.eps
39    rm -rf hires
40    cd ..
41 fi
42 cd ${cwd}/build
43 if [ -d rescue/linux/cdrom/cdtree ] ; then
44    cd rescue/linux/cdrom/cdtree
45    rm -rf bacula-*
46    cd ..
47    rm -rf bootcd.iso
48 fi 
49 cd ${cwd}/build
50 # Run Bacula configuration, make, install
51 ./regress-config ${cwd} $2 $3 $4
52 make
53 make install
54 cp src/tools/testls ../bin
55
56 cd ..
57 bin/bacula stop
58 cd bin
59 ./create_bacula_database
60 ./drop_bacula_tables
61 ./make_bacula_tables
62 ./grant_bacula_privileges
63 cd ..
64 # Start and stop Bacula to ensure conf files are OK
65 bin/bacula start
66 bin/bacula stop
67 #
68 # Save Bacula default conf files for later use
69 #
70 cp -f bin/*.conf scripts