summaryrefslogtreecommitdiff
path: root/source4/selftest
diff options
context:
space:
mode:
Diffstat (limited to 'source4/selftest')
-rwxr-xr-xsource4/selftest/provisions/undump.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/selftest/provisions/undump.sh b/source4/selftest/provisions/undump.sh
new file mode 100755
index 0000000000..07408b7ea6
--- /dev/null
+++ b/source4/selftest/provisions/undump.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# undump a provision directory
+
+[ "$#" -eq 1 ] || {
+ echo "Usage: undump.sh <DIRECTORY>"
+ exit 1
+}
+dirbase="$1"
+for f in $(find $dirbase -name '*.dump'); do
+ dname=$(dirname $f)
+ bname=$(basename $f .dump)
+ outname=$dname/$bname
+ echo "Restoring $outname"
+ rm -f $outname
+ bin/tdbrestore $outname < $f || {
+ echo "Failed to restore $outname"
+ exit 1
+ }
+done
+exit 0