diff options
author | shuai chen <chenshuai@huawei.com> | 2015-12-31 10:41:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-12-31 10:41:37 +0000 |
commit | daf5a58986e02e897359a792028e8157d7a7ad1b (patch) | |
tree | f853b7f697e284689f079832e30360f6a4b285c7 /build.sh | |
parent | 8810e8a18e59e3c23fbd3e583fe6e347158ef464 (diff) | |
parent | 4a6728a4fc08adb68cb3da2f3af8f1e366693a82 (diff) |
Merge "modify the network and indentity password"
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -32,12 +32,18 @@ function download_git() file_dir=$CACHE_DIR/${1%.*} if [[ -d $file_dir/.git ]]; then cd $file_dir - git pull origin master + source=`git remote -v | head -n 1 | awk '{print $2}'` + if [[ $2 == $source ]]; then + git pull origin master + if [[ $? -eq 0 ]]; then + cd - + return + fi + fi cd - - else - rm -rf $CACHE_DIR/$file_dir - git clone $2 $file_dir fi + rm -rf $CACHE_DIR/${1%.*} + git clone $2 $file_dir } function download_url() |