summaryrefslogtreecommitdiff
path: root/include/git.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-05-22 18:03:48 +0100
committerLeah Rowe <leah@libreboot.org>2024-05-22 18:03:48 +0100
commitd774987697824c489ce97e7664e92aeeaffd94be (patch)
treeaa6cc739a5194c764c21b0f590b61e51b78a1b10 /include/git.sh
parentc3e1aa343a0451cd8ab764cdb64b9958ff782884 (diff)
git.sh: skip submodules if .gitmodules missing
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/git.sh')
-rwxr-xr-xinclude/git.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/git.sh b/include/git.sh
index 26720757..cd4d788f 100755
--- a/include/git.sh
+++ b/include/git.sh
@@ -115,8 +115,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"