From f847a348c2eae31d5c13b4af443fe0cef16e465e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 28 Feb 2014 14:54:29 -0300 Subject: Change from PRIVATE_REPOS to the new config scheme --- share/hydra/sync | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/hydra/sync b/share/hydra/sync index d0b7dd8..2b31cb0 100755 --- a/share/hydra/sync +++ b/share/hydra/sync @@ -19,7 +19,6 @@ source $APP_BASE/lib/hydra/functions || exit 1 hydra_config_load # Sync each repository. -# TODO: change from PRIVATE_REPOS to the new config scheme function hydra_sync { for repository in $*; do if [ "$repository" == "keyringer" ]; then @@ -28,7 +27,15 @@ function hydra_sync { fi if [ ! -d "$HYDRA_FOLDER/$repository" ]; then - git clone $PRIVATE_REPOS/$repository $HYDRA_FOLDER/$repository + if [ -e "$HYDRA_FOLDER/config/repository/url" ]; then + url="`cat $HYDRA_FOLDER/config/repository/url`" + else + if [ ! -e "$HYDRA_FOLDER/config/domain" ]; then + fi + url="gitolite@admin.`cat $HYDRA_FOLDER/config/domain`:$repository" + fi + + git clone $url $HYDRA_FOLDER/$repository fi if [ -d "$HYDRA_FOLDER/$repository/.git" ]; then -- cgit v1.2.3