From: Silvio Rhatto Date: Fri, 28 Feb 2014 20:47:43 +0000 (-0300) Subject: Check if there's an origin repository when syncing X-Git-Tag: 0.2.2~103 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=48f0fa3203291a5136ca266b71bb353c851549a5;p=hydra.git Check if there's an origin repository when syncing --- diff --git a/share/hydra/sync b/share/hydra/sync index 730d030..fc71b73 100755 --- a/share/hydra/sync +++ b/share/hydra/sync @@ -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