git.sh: skip submodules if .gitmodules missing

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2-merge1
Leah Rowe 2024-05-22 18:03:48 +01:00 committed by Leah Rowe
parent 7f82622caf
commit 5e0129eb0f
1 changed files with 2 additions and 2 deletions

View File

@ -120,8 +120,8 @@ git_prep()
prep_submodules()
{
[ ! -f "$tmpgit/.gitmodules" ] || git -C "$tmpgit" submodule \
update --init --checkout || $err "git_prep $1: !submod"
[ -f "$tmpgit/.gitmodules" ] || return 0
git -C "$tmpgit" submodule update --init --checkout || $err "$1: !mod"
mdir="${PWD}/config/submodule/$project"
[ -n "$tree" ] && mdir="$mdir/$tree"