diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-07-14 14:03:53 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-07-21 11:44:37 +1000 |
commit | 2cfe528ab684c74e65e6f2617390fcd33e6baac4 (patch) | |
tree | 5990fa0a3465f80bac7f94c10c63e5e20ebf08f5 /source4 | |
parent | e01f3108ff447239fb3cb2f89b4749c5f7b88c3b (diff) | |
download | samba-2cfe528ab684c74e65e6f2617390fcd33e6baac4.tar.gz samba-2cfe528ab684c74e65e6f2617390fcd33e6baac4.tar.bz2 samba-2cfe528ab684c74e65e6f2617390fcd33e6baac4.zip |
s4-selftest: added undump.sh script
used to unpack a dumped set of provision files for selftest
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/selftest/provisions/undump.sh | 20 |
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 |