From: Uwe Hermann Date: Sun, 4 May 2014 14:05:21 +0000 (+0200) Subject: sigrok-cross-*: Use 'git clone --depth=1'. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a51ca6bd7de99d4340c0706284eea06b3482bf32;p=sigrok-util.git sigrok-cross-*: Use 'git clone --depth=1'. This saves disk space, network bandwidth, and time, since we only need the latest code version (but no history) in these scripts. --- diff --git a/cross-compile/android/sigrok-cross-android b/cross-compile/android/sigrok-cross-android index 0c7245f..f63deef 100755 --- a/cross-compile/android/sigrok-cross-android +++ b/cross-compile/android/sigrok-cross-android @@ -61,6 +61,7 @@ VER_PYTHON=3.3.3 SF_MIRROR=switch.dl.sourceforge.net WGET="wget --quiet" +GIT_CLONE="git clone --depth=1" # ----------------------------------------------------------------------------- @@ -93,7 +94,7 @@ export -n PKG_CONFIG_PATH C="--host=$TOOLCHAIN_TRIPLET --prefix=$PREFIX" # Get the latest versions of config.guess/config.sub that know about Android. -git clone git://git.savannah.gnu.org/config.git +$GIT_CLONE git://git.savannah.gnu.org/config.git # ----------------------------------------------------------------------------- @@ -222,7 +223,7 @@ make install cd .. # libserialport -git clone git://sigrok.org/libserialport +$GIT_CLONE git://sigrok.org/libserialport cd libserialport ./autogen.sh ./configure $C --without-libudev @@ -231,7 +232,7 @@ make install cd .. # libsigrok -git clone git://sigrok.org/libsigrok +$GIT_CLONE git://sigrok.org/libsigrok cd libsigrok ./autogen.sh ./configure $C @@ -240,7 +241,7 @@ make install cd .. # libsigrokdecode -git clone git://sigrok.org/libsigrokdecode +$GIT_CLONE git://sigrok.org/libsigrokdecode cd libsigrokdecode ./autogen.sh ./configure $C @@ -249,7 +250,7 @@ make install cd .. # sigrok-cli -git clone git://sigrok.org/sigrok-cli +$GIT_CLONE git://sigrok.org/sigrok-cli cd sigrok-cli ./autogen.sh ./configure $C diff --git a/cross-compile/linux/sigrok-cross-linux b/cross-compile/linux/sigrok-cross-linux index 4886f5b..d667e15 100755 --- a/cross-compile/linux/sigrok-cross-linux +++ b/cross-compile/linux/sigrok-cross-linux @@ -48,10 +48,12 @@ rm -rf $BUILDDIR mkdir $BUILDDIR cd $BUILDDIR +GIT_CLONE="git clone --depth=1" + # ----------------------------------------------------------------------------- # libserialport -git clone git://sigrok.org/libserialport +$GIT_CLONE git://sigrok.org/libserialport cd libserialport ./autogen.sh ./configure $C @@ -60,7 +62,7 @@ make install cd .. # libsigrok -git clone git://sigrok.org/libsigrok +$GIT_CLONE git://sigrok.org/libsigrok cd libsigrok ./autogen.sh PKG_CONFIG_PATH=$P ./configure $C @@ -69,7 +71,7 @@ make install cd .. # libsigrokdecode -git clone git://sigrok.org/libsigrokdecode +$GIT_CLONE git://sigrok.org/libsigrokdecode cd libsigrokdecode ./autogen.sh ./configure $C @@ -78,7 +80,7 @@ make install cd .. # sigrok-firmware -git clone git://sigrok.org/sigrok-firmware +$GIT_CLONE git://sigrok.org/sigrok-firmware cd sigrok-firmware ./autogen.sh # Nothing gets cross-compiled here, we just need 'make install' basically. @@ -87,7 +89,7 @@ make install cd .. # sigrok-firmware-fx2lafw -git clone git://sigrok.org/sigrok-firmware-fx2lafw +$GIT_CLONE git://sigrok.org/sigrok-firmware-fx2lafw cd sigrok-firmware-fx2lafw ./autogen.sh # We're building the fx2lafw firmware on the host, no need to cross-compile. @@ -97,7 +99,7 @@ make install cd .. # sigrok-cli -git clone git://sigrok.org/sigrok-cli +$GIT_CLONE git://sigrok.org/sigrok-cli cd sigrok-cli ./autogen.sh PKG_CONFIG_PATH=$P ./configure $C @@ -106,7 +108,7 @@ make install cd .. # PulseView -git clone git://sigrok.org/pulseview +$GIT_CLONE git://sigrok.org/pulseview cd pulseview PKG_CONFIG_PATH=$P cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDISABLE_WERROR=y -DENABLE_DECODE=y . make $PARALLEL diff --git a/cross-compile/mingw/sigrok-cross-mingw b/cross-compile/mingw/sigrok-cross-mingw index 2e0ceaa..5ddb1b8 100755 --- a/cross-compile/mingw/sigrok-cross-mingw +++ b/cross-compile/mingw/sigrok-cross-mingw @@ -43,6 +43,7 @@ VER_ZADIG=v2.0.1.160 SF_MIRROR=switch.dl.sourceforge.net WGET="wget --quiet" +GIT_CLONE="git clone --depth=1" # ----------------------------------------------------------------------------- @@ -109,7 +110,7 @@ $WGET -c http://$SF_MIRROR/project/libwdi/zadig/zadig_xp_$VER_ZADIG.7z cp -f zadig.exe zadig_xp.exe $PREFIX # libserialport -git clone git://sigrok.org/libserialport +$GIT_CLONE git://sigrok.org/libserialport cd libserialport ./autogen.sh PKG_CONFIG_PATH_i686_pc_mingw32_static=$P ./configure $C $L @@ -118,7 +119,7 @@ make install cd .. # libsigrok -git clone git://sigrok.org/libsigrok +$GIT_CLONE git://sigrok.org/libsigrok cd libsigrok patch -p1 < ../../libsigrok_firmwaredir.patch ./autogen.sh @@ -128,7 +129,7 @@ make install cd .. # libsigrokdecode -git clone git://sigrok.org/libsigrokdecode +$GIT_CLONE git://sigrok.org/libsigrokdecode cd libsigrokdecode ./autogen.sh patch -p1 < ../../srd_decodersdir.patch @@ -138,7 +139,7 @@ make install cd .. # sigrok-firmware -git clone git://sigrok.org/sigrok-firmware +$GIT_CLONE git://sigrok.org/sigrok-firmware cd sigrok-firmware ./autogen.sh # Nothing gets cross-compiled here, we just need 'make install' basically. @@ -147,7 +148,7 @@ make install cd .. # sigrok-firmware-fx2lafw -git clone git://sigrok.org/sigrok-firmware-fx2lafw +$GIT_CLONE git://sigrok.org/sigrok-firmware-fx2lafw cd sigrok-firmware-fx2lafw ./autogen.sh # We're building the fx2lafw firmware on the host, no need to cross-compile. @@ -157,13 +158,13 @@ make install cd .. # sigrok-dumps -git clone git://sigrok.org/sigrok-dumps +$GIT_CLONE git://sigrok.org/sigrok-dumps cd sigrok-dumps make install DESTDIR=$PREFIX/share/sigrok-dumps cd .. # sigrok-cli -git clone git://sigrok.org/sigrok-cli +$GIT_CLONE git://sigrok.org/sigrok-cli cd sigrok-cli ./autogen.sh PKG_CONFIG_PATH_i686_pc_mingw32_static=$P:$P2 ./configure $C @@ -173,7 +174,7 @@ makensis -DHOME=$HOME contrib/sigrok-cli_cross.nsi cd .. # PulseView -git clone git://sigrok.org/pulseview +$GIT_CLONE git://sigrok.org/pulseview cd pulseview PKG_CONFIG_PATH_i686_pc_mingw32_static=$P:$P2 cmake $CM -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DDISABLE_WERROR=y . make $PARALLEL VERBOSE=1