From 1c3caebc7a44e426bf2d8a673831cc9b7d4b2615 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 7 Oct 2014 11:13:39 +0800 Subject: [PATCH] fix: [base-0k] cloning should use environment variables. --- precise/base-0k/hooks/install | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/precise/base-0k/hooks/install b/precise/base-0k/hooks/install index 1fe412f..124f15c 100755 --- a/precise/base-0k/hooks/install +++ b/precise/base-0k/hooks/install @@ -2,6 +2,14 @@ set -eux # -x for verbose logging to juju debug-log +## 0k git remote path +GIT_0K_BASE=${GIT_0K_BASE:-"git.0k.io:/var/git"} + +## 0k git remote options +GIT_0K_CLONE_OPTIONS=${GIT_0K_CLONE_OPTIONS:-""} + + + apt-get -y install bash-completion wget bzip2 git-core less language-pack-en python-software-properties tmux sudo git @@ -176,6 +184,6 @@ EOF ( mkdir -p /opt/apps && cd /opt/apps && - git clone git.0k.io:/var/git/0k/git-sub && + git clone $GIT_0K_CLONE_OPTIONS "$GIT_0K_BASE"/0k/git-sub && ln -sf /opt/apps/git-sub/bin/git-sub /usr/lib/git-core/ )