]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/setup
Clean up scripts
[bacula/bacula] / regress / scripts / setup
index 242291e8656a0a979dd2fb992cc0614be57cf9b8..48d71231d35c0e770068a6fbca8fd6236ff9926f 100755 (executable)
@@ -3,8 +3,9 @@
 # Script to setup running Bacula regression tests
 #
 cwd=`pwd`
-if [ $# != 1 ] ; then
-   echo "Arg 1 must be a Bacula release directory."
+if [ $# != 3 ] ; then
+   echo "Incorrect number of arguments. Need:"
+   echo "setup bacula-src depkgs email-address"
    echo " "
    exit 1
 fi
@@ -13,18 +14,21 @@ if [ ! -d $1 ] ; then
    echo " "
    exit 1
 fi
-if [ ! -d ../depkgs ] ; then
+if [ ! -d $2 ] ; then
    cd ..
    cwd=`pwd`
-   echo "The regression scripts require ${cwd}/depkgs but not found!" 
+   echo "The regression scripts require DEPKGS as arg 2 but not found!" 
    echo " "
    exit 1
 fi
 rm -rf build bin
+# Copy new source
 cp -rp $1 build
 cp scripts/regress-config build
 cd build
-./regress-config ${cwd}
+rm -f Makefile config.cache
+# Run Bacula configuration, make, install
+./regress-config ${cwd} $2 $3
 make
 make install
 cp src/tools/testls ../bin
@@ -34,10 +38,10 @@ bin/bacula stop
 bin/create_sqlite_database
 bin/drop_sqlite_tables
 bin/make_sqlite_tables
+# Start and stop Bacula to ensure conf files are OK
 bin/bacula start
 bin/bacula stop
 #
 # Save Bacula default conf files for later use
 #
 cp -f bin/*.conf scripts
-scripts/do_sed