Bail out of shallow cloning if it fails, and do full clone instead

This commit is contained in:
Ciro Santilli
2018-01-31 23:41:41 +00:00
parent dc495f9334
commit cf063ad8d2

23
configure vendored
View File

@@ -12,15 +12,19 @@ while getopts t OPT; do
done done
shift $(($OPTIND - 1)) shift $(($OPTIND - 1))
# Shallow clonning saves a considerable ammount of time, specially because of the linux kernel. (
# However, git submodules are buggy as usual, and this is the best way i've found to get it done: set -e
# https://stackoverflow.com/questions/2144406/git-shallow-submodules/47374702#47374702 # Shallow clonning saves a considerable ammount of time, specially because of the linux kernel.
# In particular: # However, git submodules are buggy as usual, and this is the best way i've found to get it done:
# - `shallow = true` on the submodule has no effect for the non default educational branches of our submodules # https://stackoverflow.com/questions/2144406/git-shallow-submodules/47374702#47374702
# - QEMU's submodules point to commits that are neither under branches nor tags, and so `--shallow-submodules` fails # In particular:
git submodule update --depth 1 --jobs 4 --init # - `shallow = true` on the submodule has no effect for the non default educational branches of our submodules
cd qemu # - QEMU's submodules point to commits that are neither under branches nor tags, and so `--shallow-submodules` fails
git submodule update --init git submodule update --depth 1 --jobs 4 --init
cd qemu
git submodule update --init
) &
wait $! || git submodule update --init
pkgs="\ pkgs="\
automake \ automake \
@@ -37,6 +41,7 @@ gcc-arm-linux-gnueabi \
libgoogle-perftools-dev \ libgoogle-perftools-dev \
protobuf-compiler \ protobuf-compiler \
" "
command -v apt-get >/dev/null 2>&1 || { command -v apt-get >/dev/null 2>&1 || {
cat <<EOF cat <<EOF
apt-get not found. You're on your own for installing dependencies. apt-get not found. You're on your own for installing dependencies.