2 REM Script to setup running Bacula regression tests
5 IF "%1" == "" GOTO :usage
6 IF "%2" == "" GOTO :usage
7 IF "%3" == "" GOTO :usage
8 IF "%4" == "" GOTO :usage
9 IF "%5" == "" GOTO :usage
10 IF "%6" == "" GOTO :usage
11 IF "%7" == "" GOTO :usage
15 ECHO Incorrect number of arguments.
16 ECHO setup bacula-src build-type email-address smtp-host tape-device changer-device tape1-device
21 RD /s /q build bin tmp working >nul 2>&1
25 ECHO Copying source from %1
27 FOR /r %1 %%i in ( debug release ) do IF EXIST %%i ECHO %%i | sed -e "s;%SRC:\=\\%\\;;" -e "/installer\\%2/d" -e "/win32\\%2/d" >>tmp\exclude_list
28 ECHO .bsc >>tmp\exclude_list
29 ECHO .ncb >>tmp\exclude_list
31 XCOPY %1 build\ /EXCLUDE:tmp\exclude_list /e /q
33 DEL build\src\win32\%2\winbacula*.exe
35 CALL scripts\install_bacula %2 %3 %4 %5 %6 %7
37 CALL scripts\bacula stop >nul 2>&1
39 IF NOT EXIST working MKDIR working
40 ECHO Running database creation scripts
41 CALL bin\create_bacula_database
42 CALL bin\drop_bacula_tables
43 CALL bin\make_bacula_tables
44 CALL bin\grant_bacula_privileges
46 REM Start and stop Bacula to ensure conf files are OK
48 CALL scripts\bacula start
49 CALL scripts\bacula stop >nul 2>&1
52 REM Save Bacula default conf files for later use
54 COPY bin\*.conf scripts >nul