]> gitweb.fluxo.info Git - puppet-backup.git/commitdiff
Adding sync-media.skip git config at sync-media
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 18 Apr 2014 01:52:22 +0000 (22:52 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 18 Apr 2014 01:52:22 +0000 (22:52 -0300)
files/sync-media

index ea1c43092e3d953c0f33f40502968661ac70c750..6aee95b1a048f1fe78c63bd865157a3b3dcef38a 100644 (file)
@@ -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