From: Kefu Chai Date: Wed, 28 Jul 2021 09:12:33 +0000 (+0800) Subject: win32_deps_build.sh: only clone the tip of required tag X-Git-Tag: v17.1.0~1259^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42516%2Fhead;p=ceph.git 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 --- diff --git a/win32_deps_build.sh b/win32_deps_build.sh index 9e753d1e3092..19e7b02db3d2 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