5 GIT_VERSION_MAJOR=$(git --version | sed -n 's/.* \([0-9]\{1,\}\)\..*/\1/p' )
6 GIT_VERSION_MINOR=$(git --version | sed -n 's/.* \([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\2/p' )
8 if [ "$GIT_VERSION_MAJOR" -lt 2 ] || [ "$GIT_VERSION_MINOR" -lt 20 ];
10 echo "Git >= 2.20 is required for submodules to work properly with vcsh" 1>&2
14 git submodule sync --recursive
15 git submodule update --init --recursive