]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/setup
regress: add bperl alias and update functions.pm
[bacula/bacula] / regress / scripts / setup
index fc8fc8d899bb659be8f90470bf8c4820c0cc1740..0a9311ccd8751619dfb1da579e731a37eac2f499 100755 (executable)
@@ -25,7 +25,12 @@ rm -rf build bin
 # Copy new source
 echo "Copying source from ${BACULA_SOURCE}"
 cp -rp ${BACULA_SOURCE} build
-git show HEAD | grep -m 1 commit | awk '{print $2}' > build/git-version
+which git >/dev/null 2>/dev/null
+if [ $? = 0 ] ; then
+  git show HEAD | grep -m 1 commit | awk '{print $2}' > build/git-version
+else
+  echo "Git not found." >build/git-version
+fi
 scripts/create_sed
 # In default bacula-dir.conf.in, change default file 
 # to backup to be build directory
@@ -39,7 +44,7 @@ sed -f tmp/sed_tmp scripts/regress-config.in >scripts/regress-config
 chmod 755 scripts/regress-config
 cp scripts/regress-config build
 cd build
-rm -f Makefile config.cache
+rm -f Makefile config.*
 # Run Bacula configuration, make, install
 ./regress-config ${cwd}
 check_exit_code
@@ -48,12 +53,16 @@ make clean
 make -j3
 check_exit_code
 make install
-rm -rf examples patches
-check_exit_code
-# eliminate non-essential directories to reduce
-#   size.  Otherwise regress run too long
-rm -rf src/win32 examples patches
-cp src/tools/testls ../bin
+if [ a$KEEP_SOURCE = a ]; then
+   rm -rf examples patches
+   check_exit_code
+   # eliminate non-essential directories to reduce
+   #   size.  Otherwise regress run too long
+   rm -rf src/win32 examples patches
+fi
+# get all tools -- especially testls
+cd src/tools
+make installall
 check_exit_code
 
 cd ${cwd}