From 1d5b07a0928e192f0a7f017b83f90e727f70e793 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 28 Jul 2021 17:12:33 +0800 Subject: [PATCH] win32_deps_build.sh: only clone the tip of required tag no need to clone the whole repo, just clone the tip of the specified tag. this saves the bandwidth, disk IO and precious time. Signed-off-by: Kefu Chai --- win32_deps_build.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/win32_deps_build.sh b/win32_deps_build.sh index 9e753d1e3092e..19e7b02db3d27 100755 --- a/win32_deps_build.sh +++ b/win32_deps_build.sh @@ -105,8 +105,8 @@ _make BINARY_PATH=$zlibDir \ echo "Building lz4." cd $depsToolsetDir if [[ ! -d $lz4Dir ]]; then - git clone https://github.com/lz4/lz4 - cd $lz4Dir; git checkout $lz4Tag + git clone --branch $lz4Tag --depth 1 https://github.com/lz4/lz4 + cd $lz4Dir fi cd $lz4Dir _make BUILD_STATIC=no CC=${MINGW_CC%-posix*} \ @@ -117,8 +117,8 @@ _make BUILD_STATIC=no CC=${MINGW_CC%-posix*} \ echo "Building OpenSSL." cd $depsSrcDir if [[ ! -d $sslSrcDir ]]; then - git clone https://github.com/openssl/openssl - cd $sslSrcDir; git checkout $sslTag + git clone --branch $sslTag --depth 1 https://github.com/openssl/openssl + cd $sslSrcDir fi cd $sslSrcDir mkdir -p $sslDir @@ -131,8 +131,8 @@ _make install echo "Building libcurl." cd $depsSrcDir if [[ ! -d $curlSrcDir ]]; then - git clone https://github.com/curl/curl - cd $curlSrcDir && git checkout $curlTag + git clone --branch $curlTag --depth 1 https://github.com/curl/curl + cd $curlSrcDir fi cd $curlSrcDir ./buildconf @@ -223,8 +223,8 @@ _make install echo "Building snappy." cd $depsSrcDir if [[ ! -d $snappySrcDir ]]; then - git clone https://github.com/google/snappy - cd $snappySrcDir && git checkout $snappyTag + git clone --branch $snappyTag --depth 1 https://github.com/google/snappy + cd $snappySrcDir fi mkdir -p $snappySrcDir/build cd $snappySrcDir/build -- 2.39.5