fi
}
+. ./config
+
cwd=`pwd`
-if [ $# != 6 ] ; then
- echo "Incorrect number of arguments. Got $#. Need:"
- echo "setup bacula-src email-address --with-DBNAME --with-tcp-wrappers"
- echo " "
- exit 1
-fi
-if [ ! -d $1 ] ; then
- echo "Arg 1 must be a Bacula release directory."
+if [ ! -d ${BACULA_SOURCE} ] ; then
+ echo "The BACULA_SOURCE environment variable must be a Bacula release directory, but is not."
echo " "
exit 1
fi
rm -rf build bin
# Copy new source
-echo "Copying source from $1"
-cp -rp $1 build
+echo "Copying source from ${BACULA_SOURCE}"
+cp -rp ${BACULA_SOURCE} build
cp scripts/regress-config build
cd build
rm -f Makefile config.cache
# Run Bacula configuration, make, install
-./regress-config ${cwd} $2 $3 $4 $5 $6
+./regress-config ${cwd}
check_exit_code
+# Cleanup any win32 build in source
+cd src/win32
+make clean
+cd ../..
make
check_exit_code
make install