aboutsummaryrefslogtreecommitdiff
path: root/share/hydra/sync
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-02-28 17:47:43 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-02-28 17:47:43 -0300
commit48f0fa3203291a5136ca266b71bb353c851549a5 (patch)
tree0a1f9f24da8317bbe4e405813cc4f170aecc9c71 /share/hydra/sync
parent11207988058c85900bc45a61ece703ab62966929 (diff)
downloadhydra-48f0fa3203291a5136ca266b71bb353c851549a5.tar.gz
hydra-48f0fa3203291a5136ca266b71bb353c851549a5.tar.bz2
Check if there's an origin repository when syncing
Diffstat (limited to 'share/hydra/sync')
-rwxr-xr-xshare/hydra/sync10
1 files changed, 9 insertions, 1 deletions
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