.local/bin/rdiff: Change default behaviour to be more dwim.

master
Pierre Neidhardt 2021-05-09 21:11:10 +02:00
parent a84921bd5f
commit 6635bdd8ff
1 changed files with 4 additions and 6 deletions

View File

@ -2,12 +2,10 @@
usage () {
cat <<EOF>&2
Usage: ${0##*/} [OPTIONS] DIR1 DIR2
Usage: ${0##*/} OLD-DIR NEW-DIR
Use rsync to display a folder tree diff between DIR1 and DIR2.
Additional rsync OPTIONS can be used, such as '-t, --times'.
Lookup '-i, --itemize-changes' in rsync(1) for the legend.
Use rsync to display a folder tree diff between OLD-DIR and NEW-DIR.
Trailing slash is not necesssary.
EOF
}
@ -15,4 +13,4 @@ EOF
[ "$1" = "-h" ] && usage && exit
[ "$1" = "--" ] && shift
rsync -nivr -lpgod --delete --size-only "$@"
rsync -nivr --links --perms --group --owner --delete --size-only "$2/" "$1"