JobName=backup
. scripts/functions
-set_debug 0
-copy_test_confs
-rm -f bin/bacula-dir.conf
-rm -f tmp/RUN*
-rm -f ${cwd}/build/po/*old*
-rm -rf tmp/po
+scripts/cleanup
+scripts/copy-test-confs
+
/bin/cp -f scripts/bacula-dir.conf.regexwhere bin/bacula-dir.conf
echo "${cwd}/build/po" >/tmp/file-list
quit
END_OF_DATA
+run_bacula
-bin/bacula start
-cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf > /dev/null
stop_bacula
-export dstat=0
-export bstat=0
-export rstat=0
+
+dstat=0
+bstat=0
+rstat=0
+export dstat
+export bstat
+export rstat
J=JobA
if grep -q "Restore OK" tmp/RUN_$J &&
# test with bregtest
find ${cwd}/build > tmp/list
-sed -e 's/README/readme/' -e 's/\([ch]\)$/.old.\1/' tmp/list > tmp/list.sed
+# thanks to BSD like system for that...
+sed -e 's/[Rr][Ee][Aa][Dd][Mm][Ee]/readme/' -e 's/\([ch]\)$/.old.\1/' tmp/list > tmp/list.sed
./build/src/tools/bregtest -s -f tmp/list -e '/readme/readme/i,/([ch])$/.old.$1/' > tmp/list.bsed
-if diff -q tmp/list.bsed tmp/list.sed
+if diff tmp/list.bsed tmp/list.sed >/dev/null 2>&1
then
[ "$debug" = 1 ] && echo bregtest ok
else