]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
win32_deps_build.sh: only clone the tip of required tag 42542/head
authorKefu Chai <kchai@redhat.com>
Wed, 28 Jul 2021 09:12:33 +0000 (17:12 +0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 29 Jul 2021 09:26:56 +0000 (11:26 +0200)
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>
(cherry picked from commit 1d5b07a0928e192f0a7f017b83f90e727f70e793)

win32_deps_build.sh

index 0a1e07ecb449dd81109d864cca55c093c71f63d9..2f18ace1518f71fdeed950927250baecb2a6422e 100755 (executable)
@@ -103,8 +103,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*} \
@@ -115,8 +115,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
@@ -129,8 +129,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
@@ -221,8 +221,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