From 7d2ef9a55318991b7781c9e6d39846c96f443c59 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 17 May 2023 17:22:29 -0700 Subject: [PATCH] add delete exclude option --- sync/common | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sync/common b/sync/common index 9985876..3c3f62a 100644 --- a/sync/common +++ b/sync/common @@ -125,6 +125,15 @@ function rsync_no_delete_staging_with_excludes() { compose/ "${TARGET}" } +function rsync_delete_staging_with_excludes() { + local TARGET="${1}" + local EXCLUDE="${2}" + sudo -l && rsync -vrlptDSH --chown=10004:10005 --progress --human-readable \ + --exclude "${EXCLUDE}" \ + --exclude Minimal \ + compose/ "${TARGET}" +} + function rsync_no_delete_prod() { local REV="${1}" local TARGET="${2}" @@ -203,6 +212,7 @@ export -f rsync_no_delete_staging export -f rsync_no_delete_staging_with_excludes export -f rsync_no_delete_prod export -f rsync_delete_staging +export -f rsync_delete_staging_with_excludes export -f rsync_delete_prod export -f perform_hardlink export -f createrepo_only