]> gitweb.fluxo.info Git - hydra.git/commitdiff
Sync-media getall by default on removable media
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Oct 2016 21:54:22 +0000 (18:54 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Oct 2016 21:54:22 +0000 (18:54 -0300)
share/hydractl/sync-media

index 3045ae24bb54e5f4511731ed3209522c2303d86f..45e7c5b5e9d3fcb8bd516624b4864bd7540d4d2b 100755 (executable)
@@ -195,7 +195,8 @@ for folder in `ls $CACHE`; do
         cd $VOLUME/$MEDIA
         echo "Initializing $VOLUME/$MEDIA/$folder..."
         git clone $CACHE/$folder && cd $folder && sync_media_identity && git annex init $DRIVE && \
-          git remote rename origin $HOST && cd $CACHE/$folder && git remote add $DRIVE $VOLUME/$MEDIA/$folder
+          git remote rename origin $HOST && git config sync-media.getall true && \
+          cd $CACHE/$folder && git remote add $DRIVE $VOLUME/$MEDIA/$folder
         )
       fi
     elif [ ! -d "$VOLUME/$MEDIA/$folder" ]; then
@@ -219,8 +220,8 @@ if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then
       cd $VOLUME/$MEDIA/$folder
       echo "Syncing $VOLUME/$MEDIA/$folder..."
 
-      sync_media_ensure_remote $HOST $CACHE/$folder
       sync_media_playlist_perms
+      sync_media_ensure_remote $HOST $CACHE/$folder
       sync_media_identity
       sync_media_add
       git annex sync