]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
win32: speed up and simplify deps cloning 48377/head
authorKen Dreyer <kdreyer@redhat.com>
Fri, 30 Sep 2022 20:56:35 +0000 (16:56 -0400)
committerKen Dreyer <kdreyer@redhat.com>
Mon, 10 Oct 2022 17:22:52 +0000 (13:22 -0400)
Use --depth 1 for all the dependencies we clone to speed up the process.

Use the --branch argument for cloning all dependencies. This simplifies
the process and makes it easier to use other copies in an offline
environment where github.com is inaccessible.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
win32_deps_build.sh

index fc2b026675772f7f90150d59fea81b45a0be8c60..d276aea6055b443a33e015e0dca95f111b05a4ba 100755 (executable)
@@ -107,7 +107,7 @@ source "$SCRIPT_DIR/mingw_conf.sh"
 echo "Building zlib."
 cd $depsSrcDir
 if [[ ! -d $zlibSrcDir ]]; then
-    git clone https://github.com/madler/zlib
+    git clone --depth 1 https://github.com/madler/zlib
 fi
 cd $zlibSrcDir
 # Apparently the configure script is broken...
@@ -213,7 +213,7 @@ EOL
 echo "Building libbacktrace."
 cd $depsSrcDir
 if [[ ! -d $backtraceSrcDir ]]; then
-    git clone https://github.com/ianlancetaylor/libbacktrace
+    git clone --depth 1 https://github.com/ianlancetaylor/libbacktrace
 fi
 mkdir -p $backtraceSrcDir/build
 cd $backtraceSrcDir/build
@@ -290,8 +290,7 @@ $MINGW_DLLTOOL -d $winLibDir/mswsock.def \
 echo "Fetching libwnbd."
 cd $depsSrcDir
 if [[ ! -d $wnbdSrcDir ]]; then
-    git clone $wnbdUrl
-    cd $wnbdSrcDir && git checkout $wnbdTag
+    git clone --branch $wnbdTag --depth 1 $wnbdUrl
 fi
 cd $wnbdSrcDir
 mkdir -p $wnbdLibDir
@@ -302,10 +301,8 @@ $MINGW_DLLTOOL -d $wnbdSrcDir/libwnbd/libwnbd.def \
 echo "Fetching dokany."
 cd $depsSrcDir
 if [[ ! -d $dokanSrcDir ]]; then
-    git clone $dokanUrl
+    git clone --branch $dokanTag --depth 1 $dokanUrl
 fi
-cd $dokanSrcDir
-git checkout $dokanTag
 
 mkdir -p $dokanLibDir
 $MINGW_DLLTOOL -d $dokanSrcDir/dokan/dokan.def \