From dc6bfaac632fa5c2d6507464fa23e49fc40e59de Mon Sep 17 00:00:00 2001 From: Adar Nimrod Date: Thu, 6 Jul 2017 19:46:37 +0300 Subject: [PATCH] - Don't copy emtpy directories. --- .bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 593b58d..082ea2c 100644 --- a/.bashrc +++ b/.bashrc @@ -149,7 +149,7 @@ sync_comics () { local this_month last_month this_month="$( date '+xbmc.shore.co.il:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*' )" last_month="$( date --date '1 month ago' '+xbmc.shore.co.il:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*' )" - rsync --ignore-missing-args --recursive --compress --progress --exclude "*.part" "$last_month" "$this_month" "$HOME/Downloads/Comics/" + rsync --prune-empty-dirs --ignore-missing-args --recursive --compress --progress --exclude "*.part" "$last_month" "$this_month" "$HOME/Downloads/Comics/" find "$HOME/Downloads/Comics/" -name "$(date --date '2 month ago' +'0-Day\ Week\ of\ %Y.%m.*')" -print0 | xargs -r0 rm -r } -- GitLab