diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-09-11 15:04:02 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-09-11 15:04:02 -0300 |
commit | 86b694f25a02762663e9edb0763a7f4aa236497e (patch) | |
tree | e2210e27339a08ffacd9a6eff095cb7ee212d5a6 /files/sync-media | |
parent | b1ef0e503e6a2cc4577893cb47ceee7d8d2dba99 (diff) | |
parent | d3bf36a9762c84e41ba2f5c388424685e2aa5f86 (diff) | |
download | puppet-backup-86b694f25a02762663e9edb0763a7f4aa236497e.tar.gz puppet-backup-86b694f25a02762663e9edb0763a7f4aa236497e.tar.bz2 |
Merge branch 'master' into develop
Diffstat (limited to 'files/sync-media')
-rw-r--r-- | files/sync-media | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/files/sync-media b/files/sync-media index 5a432f8..a6e0ebe 100644 --- a/files/sync-media +++ b/files/sync-media @@ -152,8 +152,10 @@ if [ -d "$CACHE" ]; then ) fi elif [ ! -d "$VOLUME/$MEDIA/$folder" ]; then - echo "Syncing $VOLUME/$MEDIA/$folder..." - rsync -av --delete $CACHE/$folder/ $VOLUME/$MEDIA/$folder/ + if [ ! -e "$CACHE/$folder/.sync-media-skip" ]; then + echo "Syncing $VOLUME/$MEDIA/$folder..." + rsync -av --delete $CACHE/$folder/ $VOLUME/$MEDIA/$folder/ + fi fi done fi @@ -195,8 +197,10 @@ if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then #git annex drop --auto --numcopies=2 ) elif [ -d "$CACHE/$folder" ]; then - echo "Syncing $VOLUME/$MEDIA/$folder..." - rsync -av --delete $CACHE/$folder/ $VOLUME/$MEDIA/$folder/ + if [ ! -e "$CACHE/$folder/.sync-media-skip" ]; then + echo "Syncing $VOLUME/$MEDIA/$folder..." + rsync -av --delete $CACHE/$folder/ $VOLUME/$MEDIA/$folder/ + fi fi done elif [ ! -z "$REMOTE" ]; then @@ -217,8 +221,10 @@ elif [ ! -z "$REMOTE" ]; then echo "No such remote $REMOTE" fi else - echo "Syncing $VOLUME/$MEDIA/$folder..." - rsync -av --delete $CACHE/$folder/ $REMOTE.$DOMAIN:$CACHE/$folder/ + if [ ! -e "$CACHE/$folder/.sync-media-skip" ]; then + echo "Syncing $VOLUME/$MEDIA/$folder..." + rsync -av --delete $CACHE/$folder/ $REMOTE.$DOMAIN:$CACHE/$folder/ + fi fi done fi |