From dd4fd93e1213962ab7a4d4e03cc2378e1385e1ec Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 18 Nov 2024 16:53:12 +0100 Subject: [PATCH] rsync --- sh/alias/rsync.sh | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/sh/alias/rsync.sh b/sh/alias/rsync.sh index 7a94aac..02ea400 100644 --- a/sh/alias/rsync.sh +++ b/sh/alias/rsync.sh @@ -1,11 +1,6 @@ # synchronize -rs() { - rsb \ - "${@}" -} - -# base arguments -rsb() { +rs() { sh_a__r_sync "${@}"; } +sh_a__r_sync() { rsync \ --archive \ --no-inc-recursive \ @@ -16,16 +11,17 @@ rsb() { } # synchronize and delete after -rsda() { - rsb \ +rsda() { sh_a__r_sync_delete_after "${@}"; } +sh_a__r_sync_delete_after() { + sh_a__r_sync \ --delete-after \ "${@}" } # synchronize and delete before -rsdb() { r_sync_delete_before "${@}"; } -r_sync_delete_before() { - rsb \ +rsdb() { sh_a__r_sync_delete_before "${@}"; } +sh_a__r_sync_delete_before() { + sh_a__r_sync \ --delete-before \ "${@}" }