diff options
author | QiLiang <liangqi1@huawei.com> | 2016-01-16 14:55:07 +0000 |
---|---|---|
committer | qi liang <liangqi1@huawei.com> | 2016-01-16 15:13:42 +0000 |
commit | caa7ed3cf693e4ab499e9562116e73a212ac665f (patch) | |
tree | 61a7cc334434b546caac66a869555660d91d1dec /utils | |
parent | 0e5f71563fe8dd2a5e357b37d303331ee0f13c9d (diff) |
Scripts update to run rubbos on compass4nfv env 3
JIRA: -
Change-Id: Ia962fbbd8a0479c86f5afbde8232ef36e1740e47
Signed-off-by: QiLiang <liangqi1@huawei.com>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/infra_setup/vm_dev_setup/setup_env.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/utils/infra_setup/vm_dev_setup/setup_env.sh b/utils/infra_setup/vm_dev_setup/setup_env.sh index 1ddab5de..bfc8f724 100755 --- a/utils/infra_setup/vm_dev_setup/setup_env.sh +++ b/utils/infra_setup/vm_dev_setup/setup_env.sh @@ -53,13 +53,13 @@ bottlenecks_prepare_env() git_checkout() { - if git cat-file -e $1^{commit} 2>/dev/null; then + if sudo git cat-file -e $1^{commit} 2>/dev/null; then # branch, tag or sha1 object - git checkout $1 + sudo git checkout $1 else # refspec / changeset - git fetch --tags --progress $2 $1 - git checkout FETCH_HEAD + sudo git fetch --tags --progress $2 $1 + sudo git checkout FETCH_HEAD fi } @@ -69,12 +69,12 @@ bottlenecks_download_repo() sudo git config --global http.sslVerify false if [ ! -d $BOTTLENECKS_REPO_DIR ]; then - git clone $BOTTLENECKS_REPO $BOTTLENECKS_REPO_DIR + sudo git clone $BOTTLENECKS_REPO $BOTTLENECKS_REPO_DIR fi - cd $BOTTLENECKS_REPO_DIR - git checkout master && git pull + sudo cd $BOTTLENECKS_REPO_DIR + sudo git checkout master && sudo git pull git_checkout $BOTTLENECKS_BRANCH $BOTTLENECKS_REPO - cd - + sudo cd - } bottlenecks_config_hosts_ip() |