3 # Test that src and dest trees are as identical as bup is capable of
4 # making them. For now, use rsync -niaHAX ...
11 Usage: compare-trees [-h] [-c] [-x] SOURCE DEST
16 Check file content (default)
18 Don't check file content (rely on size/timestamps, etc.)
22 verify_content=" --checksum"
24 while getopts "hc" OPTION
28 c) verify_content=" --checksum";;
29 x) verify_content="";;
30 ?) usage 1>&2; exit 1;;
34 shift $(($OPTIND - 1))
46 trap "rm -rf '${tmpfile}'" EXIT
48 rsync -niaHAX$verify_content --delete "$src" "$dest" > "${tmpfile}"
49 if test $(wc -l < "${tmpfile}") != 0; then
50 echo "Differences between $src and $dest"