aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-04-17 22:52:22 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-04-17 22:52:22 -0300
commit3be44e4255cd4dbdc6d1c3319eb9df590cf46078 (patch)
treef6deeb7ba1a46e3797724bd7687863c57633fcb1 /files
parentea668fd692a932f5017f370baa7cefc54db68087 (diff)
downloadpuppet-backup-3be44e4255cd4dbdc6d1c3319eb9df590cf46078.tar.gz
puppet-backup-3be44e4255cd4dbdc6d1c3319eb9df590cf46078.tar.bz2
Adding sync-media.skip git config at sync-media
Diffstat (limited to 'files')
-rw-r--r--files/sync-media16
1 files changed, 16 insertions, 0 deletions
diff --git a/files/sync-media b/files/sync-media
index ea1c430..6aee95b 100644
--- a/files/sync-media
+++ b/files/sync-media
@@ -82,6 +82,10 @@ if [ -d "$CACHE" ]; then
# Add and update local repositories
for folder in `ls $CACHE`; do
if [ -d "$CACHE/$folder/.git/annex" ]; then
+ if [ "`git -C $CACHE/$folder config sync-media.skip`" == "true" ]; then
+ continue
+ fi
+
(
cd $CACHE/$folder
echo "Syncing $CACHE/$folder..."
@@ -114,6 +118,10 @@ if [ -d "$CACHE" ]; then
else
for folder in `ls $CACHE`; do
if [ -d "$CACHE/$folder/.git/annex" ]; then
+ if [ "`git -C $CACHE/$folder config sync-media.skip`" == "true" ]; then
+ continue
+ fi
+
if [ ! -d "$VOLUME/$MEDIA/$folder" ]; then
(
cd $VOLUME/$MEDIA
@@ -136,6 +144,10 @@ fi
if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then
for folder in `ls $VOLUME/$MEDIA`; do
if [ -d "$VOLUME/$MEDIA/$folder/.git/annex" ]; then
+ if [ "`git -C $CACHE/$folder config sync-media.skip`" == "true" ]; then
+ continue
+ fi
+
(
cd $VOLUME/$MEDIA/$folder
echo "Syncing $VOLUME/$MEDIA/$folder..."
@@ -170,6 +182,10 @@ else
# Try to copy to a remote
for folder in `ls $CACHE`; do
if [ -d "$CACHE/$folder/.git/annex" ]; then
+ if [ "`git -C $CACHE/$folder config sync-media.skip`" == "true" ]; then
+ continue
+ fi
+
(
if git remote | grep -q "^$DISK$"; then
cd $CACHE/$folder