include/git: only download submodules if possible

Signed-off-by: Leah Rowe <leah@libreboot.org>
btrfsvols
Leah Rowe 2023-10-20 07:47:10 +01:00
parent 0c32c1d643
commit f855611c99
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ prepare_new_tree()
git_reset_rev "src/${project}/${tree}" "${rev}" git_reset_rev "src/${project}/${tree}" "${rev}"
( (
x_ cd "src/${project}/${tree}" x_ cd "src/${project}/${tree}"
git submodule update --init --checkout || \ [ ! -f ".gitmodules" ] || \
git submodule update --init --checkout || \
err "prepare_new_tree ${project}/${tree}: can't update git modules" err "prepare_new_tree ${project}/${tree}: can't update git modules"
) )
git_am_patches "$PWD/src/$project/$tree" "$PWD/$cfgsdir/$tree/patches" git_am_patches "$PWD/src/$project/$tree" "$PWD/$cfgsdir/$tree/patches"