]> gitweb.fluxo.info Git - hydra.git/commitdiff
Check if there's an origin repository when syncing
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 28 Feb 2014 20:47:43 +0000 (17:47 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 28 Feb 2014 20:47:43 +0000 (17:47 -0300)
share/hydra/sync

index 730d030297eae111aeb377aa30bef9d41c4742de..fc71b73c0a46db23f2f4663a1cfd27088ec20844 100755 (executable)
@@ -47,7 +47,15 @@ function hydra_sync {
       if [ "$repository" == "bootless" ]; then
         ( cd $HYDRA_FOLDER/$repository && git annex sync )
       else
-        ( cd $HYDRA_FOLDER/$repository && git pull origin master && git submodule update --init )
+        (
+          cd $HYDRA_FOLDER/$repository
+          if git remote | grep -q "origin"; then
+            git pull origin master
+            git submodule update --init
+          else
+            echo "No origin repository configured for $repository, skipping..."
+          fi
+        )
       fi
     fi
   done