aboutsummaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-12-29 22:38:04 +0800
committerbaigk <baiguoku@huawei.com>2015-12-31 07:41:26 +0000
commit4a6728a4fc08adb68cb3da2f3af8f1e366693a82 (patch)
tree18435b9014988900d54bdc2e733ec0a143a06698 /build.sh
parentbb77d2e1d5a41da912b8d3a09c825d74ead18cb1 (diff)
modify the network and indentity password
Change-Id: I000b580de67f01ea2b2a68ed0bfdefd09de610e8 Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index d3bc3f28..e24df446 100755
--- a/build.sh
+++ b/build.sh
@@ -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()