1#! /bin/sh 2 3. ${tstdir-.}/lib.sh 4. ${tstdir-.}/conf.sh 5 6umask 022 7rm -rf dir1 dir2 dir3 8# make the copy-from-here tree 9mkdir dir1 10cd dir1 11generate_tree_1 12chmod 640 foo/bar/baz/one.txt 13touch -m -t 199901020405 foo/bar/baz/one.txt 14# make the tree we want to compare to 15mkdir ../dir2 16cd ../dir2 17genfile one.txt 18# we expect umask permissions after rsync 19chmod 644 one.txt 20 21mkdir ../dir3 22cd ../dir3 23genfile one.txt 24# we expect umask permissions after rsync 25chmod 644 one.txt 26 27cd .. 28# call -a without -p 29$rsync -Dgorltr dir1/foo/bar/baz/one.txt dir3 30compare_trees dir2 dir3 31