.local/bin/rdiff: Change default behaviour to be more dwim.
parent
a84921bd5f
commit
6635bdd8ff
|
@ -2,12 +2,10 @@
|
||||||
|
|
||||||
usage () {
|
usage () {
|
||||||
cat <<EOF>&2
|
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.
|
Use rsync to display a folder tree diff between OLD-DIR and NEW-DIR.
|
||||||
|
Trailing slash is not necesssary.
|
||||||
Additional rsync OPTIONS can be used, such as '-t, --times'.
|
|
||||||
Lookup '-i, --itemize-changes' in rsync(1) for the legend.
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,4 +13,4 @@ EOF
|
||||||
[ "$1" = "-h" ] && usage && exit
|
[ "$1" = "-h" ] && usage && exit
|
||||||
[ "$1" = "--" ] && shift
|
[ "$1" = "--" ] && shift
|
||||||
|
|
||||||
rsync -nivr -lpgod --delete --size-only "$@"
|
rsync -nivr --links --perms --group --owner --delete --size-only "$2/" "$1"
|
||||||
|
|
Loading…
Reference in New Issue