11fdfa8fbSanton#! /bin/sh 21fdfa8fbSanton 31fdfa8fbSanton. ${tstdir-.}/lib.sh 41fdfa8fbSanton. ${tstdir-.}/conf.sh 51fdfa8fbSanton 61fdfa8fbSantongenerate_tree() { 71fdfa8fbSanton mkdirfile "${1}/one.txt" 81fdfa8fbSanton} 91fdfa8fbSanton 101fdfa8fbSantonrm -rf dir1 dir2 dir3 111fdfa8fbSanton# make the copy-from-here tree 121fdfa8fbSantongenerate_tree dir1 131fdfa8fbSanton# make the tree we want to compare to 141fdfa8fbSantongenerate_tree dir2 151fdfa8fbSanton 161fdfa8fbSanton# Also make the target tree and mess up some permissions in there. 171fdfa8fbSanton# We expect rsync to reset this to what dir1 has. 181fdfa8fbSantongenerate_tree dir3 19*932b7127Sbluhmchmod 470 dir3/one.txt 201fdfa8fbSantontouch -m -t 199901020405 dir3/one.txt 211fdfa8fbSanton 221fdfa8fbSanton$rsync -a dir1/ dir3 231fdfa8fbSantoncompare_trees dir2 dir3 24