diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-02-28 17:47:43 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-02-28 17:47:43 -0300 |
commit | 48f0fa3203291a5136ca266b71bb353c851549a5 (patch) | |
tree | 0a1f9f24da8317bbe4e405813cc4f170aecc9c71 | |
parent | 11207988058c85900bc45a61ece703ab62966929 (diff) | |
download | hydra-48f0fa3203291a5136ca266b71bb353c851549a5.tar.gz hydra-48f0fa3203291a5136ca266b71bb353c851549a5.tar.bz2 |
Check if there's an origin repository when syncing
-rwxr-xr-x | share/hydra/sync | 10 |
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 |