Browse Source

Tools/check_submodules.sh attempt update before sync to handle changes

master
Daniel Agar 3 years ago
parent
commit
24b00317b5
No known key found for this signature in database
GPG Key ID: FD3CBA98017A69DE
  1. 12
      Tools/check_submodules.sh

12
Tools/check_submodules.sh

@ -7,9 +7,10 @@ if [[ -f $1"/.git" || -d $1"/.git" ]]; then @@ -7,9 +7,10 @@ if [[ -f $1"/.git" || -d $1"/.git" ]]; then
# always update within CI environment or configuring withing VSCode CMake where you can't interact
if [ "$CI" == "true" ] || [ -n "${VSCODE_PID+set}" ]; then
git submodule --quiet update --init --recursive --force --jobs=4 -- $1 || true
git submodule --quiet sync --recursive -- $1
git submodule --quiet update --init --recursive --jobs=8 -- $1 || true
git submodule --quiet update --init --recursive --jobs=8 -- $1
git submodule --quiet update --init --recursive --force --jobs=4 -- $1 || true
git submodule --quiet update --init --recursive --force --jobs=4 -- $1
exit 0
fi
@ -49,9 +50,10 @@ if [[ -f $1"/.git" || -d $1"/.git" ]]; then @@ -49,9 +50,10 @@ if [[ -f $1"/.git" || -d $1"/.git" ]]; then
fi
fi
else
git submodule --quiet sync --recursive --quiet -- $1
git submodule --quiet update --init --recursive -- $1 || true
git submodule --quiet update --init --recursive -- $1
git submodule --quiet update --init --recursive --jobs=4 -- $1 || true
git submodule --quiet sync --recursive -- $1
git submodule --quiet update --init --recursive --jobs=4 -- $1 || true
git submodule --quiet update --init --recursive --jobs=4 -- $1
fi
}

Loading…
Cancel
Save