]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
win32_deps_build.sh: only clone the tip of required tag 42516/head
authorKefu Chai <kchai@redhat.com>
Wed, 28 Jul 2021 09:12:33 +0000 (17:12 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 29 Jul 2021 04:13:26 +0000 (12:13 +0800)
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 <kchai@redhat.com>
win32_deps_build.sh

index 9e753d1e3092ebecbf907bebe8fae0e9fd79533c..19e7b02db3d278707bf421d38e101ebd60d3b2a9 100755 (executable)
@@ -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