]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Backport from BEE regress/scripts/asyncregress.sh
authorEric Bollengier <eric@baculasystems.com>
Fri, 4 Sep 2020 08:49:54 +0000 (10:49 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:56 +0000 (09:02 +0100)
regress/scripts/asyncregress.sh [new file with mode: 0755]

diff --git a/regress/scripts/asyncregress.sh b/regress/scripts/asyncregress.sh
new file mode 100755 (executable)
index 0000000..10f37d5
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# when working with multiple regress directory, 
+# sync the local directory using ${BACULA_SOURCE}/../regress
+
+set -e
+
+. ./config
+
+if [ -d ../bacula/src ] ; then
+   echo "You are not in a remote regress directory"
+   exit 1
+fi
+
+regress_dir="${BACULA_SOURCE}/../regress"
+for d in scripts tests win32 ; do
+   src="${regress_dir}/../regress/${d}"
+   if [ ! -d ${src} ] ; then
+      echo "source directory not found, skip: ${src}"
+      continue
+   fi
+   if [ ! -d ${d} ] ; then
+      echo "target directory not found, skip: ${d}"
+      continue
+   fi
+   rsync -av ${src}/ ${d}/ 
+done
+# rsync the top of regress/ directory
+rsync -dlptgoDv --exclude config ${regress_dir}/* .
+