aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-09-11 15:34:32 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-09-11 15:34:32 -0300
commit1b95fb70968f3b1aa05cd21ef1b1377630d5cf76 (patch)
treee0a65b58d2ae70eeab9a26f05494c0d99c1f9664
parentd3bf36a9762c84e41ba2f5c388424685e2aa5f86 (diff)
downloadpuppet-backup-1b95fb70968f3b1aa05cd21ef1b1377630d5cf76.tar.gz
puppet-backup-1b95fb70968f3b1aa05cd21ef1b1377630d5cf76.tar.bz2
Support for .sync-media folder at sync-media
-rw-r--r--files/sync-media12
1 files changed, 6 insertions, 6 deletions
diff --git a/files/sync-media b/files/sync-media
index 6fba114..3cffa5b 100644
--- a/files/sync-media
+++ b/files/sync-media
@@ -142,9 +142,9 @@ if [ -d "$CACHE" ]; then
)
fi
elif [ ! -d "$VOLUME/$MEDIA/$folder" ]; then
- if [ ! -e "$CACHE/$folder/.sync-media-skip" ]; then
+ if [ ! -e "$CACHE/$folder/.sync-media/skip" ]; then
echo "Syncing $VOLUME/$MEDIA/$folder..."
- rsync -av --delete $CACHE/$folder/ $VOLUME/$MEDIA/$folder/
+ rsync -av --delete --exclude=.sync-media $CACHE/$folder/ $VOLUME/$MEDIA/$folder/
fi
fi
done
@@ -187,9 +187,9 @@ if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then
#git annex drop --auto --numcopies=2
)
elif [ -d "$CACHE/$folder" ]; then
- if [ ! -e "$CACHE/$folder/.sync-media-skip" ]; then
+ if [ ! -e "$CACHE/$folder/.sync-media/skip" ]; then
echo "Syncing $VOLUME/$MEDIA/$folder..."
- rsync -av --delete $CACHE/$folder/ $VOLUME/$MEDIA/$folder/
+ rsync -av --delete --exclude=.sync-media $CACHE/$folder/ $VOLUME/$MEDIA/$folder/
fi
fi
done
@@ -211,9 +211,9 @@ elif [ ! -z "$REMOTE" ]; then
echo "No such remote $REMOTE"
fi
else
- if [ ! -e "$CACHE/$folder/.sync-media-skip" ]; then
+ if [ ! -e "$CACHE/$folder/.sync-media/skip" ]; then
echo "Syncing $VOLUME/$MEDIA/$folder..."
- rsync -av --delete $CACHE/$folder/ $REMOTE.$DOMAIN:$CACHE/$folder/
+ rsync -av --delete --exclude=.sync-media $CACHE/$folder/ $REMOTE.$DOMAIN:$CACHE/$folder/
fi
fi
done