ambevar-dotfiles/.bin/rdiff

22 lines
404 B
Bash
Executable File

#!/bin/sh
usage () {
cat <<EOF>&2
Usage: ${0##*/} [OPTIONS] DIR1 DIR2
Use rsync to display a folder tree diff between DIR1 and DIR2.
Additional rsync OPTIONS can be used, such as '-t, --times'.
Lookup rsync(1) for '-i, --itemize-changes' for the legend.
EOF
}
[ $# -lt 2 ] && usage && exit 1
[ "$1" = "-h" ] && usage && exit
[ "$1" = "--" ] && shift
rsync -nivr -lpgod --delete --size-only "$@"