tdo not require a branch for clone-git - arm-sdk - os build toolkit for various embedded devices (HTM) git clone https://git.parazyd.org/arm-sdk (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules (DIR) README (DIR) LICENSE --- (DIR) commit 8b8934000e49322811c5b26934c229958b2f7d9a (DIR) parent 4f559a0012e2a2356444383def395457a45d22d5 (HTM) Author: parazyd <parazyd@dyne.org> Date: Fri, 30 Sep 2016 18:47:33 +0200 do not require a branch for clone-git Diffstat: M boards/cubietruck.sh | 6 +++--- M lib/helpers | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) --- (DIR) diff --git a/boards/cubietruck.sh b/boards/cubietruck.sh t@@ -73,9 +73,9 @@ build_kernel_armhf() { notice "building $arch kernel" mkdir -p $R/tmp/kernels/$device_name - clone-git $sunxi_boards master "$R/tmp/kernels/$device_name/sunxi-boards" - clone-git $sunxi_tools master "$R/tmp/kernels/$device_name/sunxi-tools" - clone-git $sunxi_uboot "mirror/next" "$R/tmp/kernels/$device_name/sunxi-uboot" + clone-git $sunxi_boards "$R/tmp/kernels/$device_name/sunxi-boards" master + clone-git $sunxi_tools "$R/tmp/kernels/$device_name/sunxi-tools" master + clone-git $sunxi_uboot "$R/tmp/kernels/$device_name/sunxi-uboot" pushd $R/tmp/kernels/$device_name/sunxi-tools act "running fex2bin" (DIR) diff --git a/lib/helpers b/lib/helpers t@@ -61,10 +61,10 @@ get-kernel-firmware() { clone-git() { fn clone-git "$@" - req=(giturl gitbr clonepath) + req=(giturl clonepath) local giturl="$1" - local gitbr="$2" - local clonepath="$3" + local clonepath="$2" + local gitbr="$3" ckreq || return 1 notice "grabbing $(basename $clonepath)" t@@ -74,9 +74,10 @@ clone-git() { git pull popd else + [[ -n $gitbr ]] && gitbr="-b $gitbr" git clone --depth 1 \ $giturl \ - -b $gitbr \ + $gitbr \ $clonepath fi }