5
echo "making directory tree and files"
7
echo "i'm file1" > 1/a/file1
8
echo "i'm file2" > 1/a/b/file2
9
echo "i'm file3" > 1/a/b/c/file3
11
mkdir 1/.snap/foosnap1
15
echo "checking snapshot contains tree..."
16
dir1=`find 1/.snap/foosnap1 | wc -w`
17
dir2=`find 2/ | wc -w`
18
#diff $dir1 $dir2 && echo "Success!"
19
test $dir1==$dir2 && echo "Success!"
20
echo "adding folder and file to tree..."
22
echo "i'm file 4!" > 2/a/b/c/d/file4
23
echo "snapshotting tree 2"
24
mkdir 2/.snap/barsnap2
25
echo "comparing snapshots"
26
dir1=`find 1/.snap/foosnap1/ -maxdepth 2 | wc -w`
27
dir2=`find 2/.snap/barsnap2/ -maxdepth 2 | wc -w`
28
#diff $dir1 $dir2 && echo "Success!"
29
test $dir1==$dir2 && echo "Success!"
30
echo "moving subtree to first folder"
32
echo "comparing snapshots and new tree"
33
dir1=`find 1/ | wc -w`
34
dir2=`find 2/.snap/barsnap2/a/b/c | wc -w`
35
#diff $dir1 $dir2 && echo "Success!"
36
test $dir1==$dir2 && echo "Sucess!"
b'\\ No newline at end of file'