From dd287b15a34130d6016be7774fca838dd529aa97 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Thu, 16 Mar 2017 22:25:27 +0200 Subject: [PATCH] - Added shell function to sync downloaded comics from the torrent machine to the laptop. --- .bashrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.bashrc b/.bashrc index e9e3e29..9b23dbb 100644 --- a/.bashrc +++ b/.bashrc @@ -106,4 +106,10 @@ docker-dev () { --workdir "$PWD" "$repo:dev" /bin/sh -l } +sync-comics () { + this_month="$( date '+xbmc:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*' )" + last_month="$( date --date '1 month ago' '+xbmc:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*' )" + rsync --recursive --compress --progress "$last_month" "$this_month" "$HOME/Downloads/Comics/" +} + . $HOME/Documents/Shore/bundle_certs/bundle_certs -- GitLab