1#! /bin/sh 2 3# testing modification time. This is tricky for two reasons: 4# - BSD find only emits minutes granularity 5# - the test might run less than a second, but the rsync 6# protocol has 1 second roundoff in times 7# So we set some time older than this software for some 8# parts of the original tree. 9 10. ${tstdir-.}/lib.sh 11. ${tstdir-.}/conf.sh 12 13rm -rf dir1 dir2 dir3 14# make the copy-from-here tree 15mkdir dir1 16cd dir1 17touch -d 1976-10-21T01:01:01 foo 18# make the tree we want to compare to 19mkdir ../dir2 20cd ../dir2 21touch foo 22 23# test b - we want the time set to the current time by rsync 24mkdir ../dir3 25cd ../dir3 26touch -d 1975-10-21T01:01:01 foo 27 28cd .. 29# call -a without -t 30$rsync -Dgorlp dir1/ dir3 31compare_trees dir2 dir3 32