From 48f0fa3203291a5136ca266b71bb353c851549a5 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 28 Feb 2014 17:47:43 -0300 Subject: Check if there's an origin repository when syncing --- share/hydra/sync | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3