From 6635bdd8ff9d946b0b764d735942cac38ab2ae52 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Sun, 9 May 2021 21:11:10 +0200 Subject: [PATCH] .local/bin/rdiff: Change default behaviour to be more dwim. --- .local/bin/rdiff | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.local/bin/rdiff b/.local/bin/rdiff index db77749d..6aef14d7 100755 --- a/.local/bin/rdiff +++ b/.local/bin/rdiff @@ -2,12 +2,10 @@ usage () { cat <&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"