From a30b1f33e38ff0bf91a92dc7eefd1b1789bc6ce9 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 11 Apr 2020 03:10:40 +0200 Subject: [PATCH] Add support for Git submodules --- src/deforaos-git-doc.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/deforaos-git-doc.sh b/src/deforaos-git-doc.sh index fb8fa85..b0183ba 100755 --- a/src/deforaos-git-doc.sh +++ b/src/deforaos-git-doc.sh @@ -35,6 +35,7 @@ PROGNAME_GIT_DOC="deforaos-git-doc.sh" CONFIGURE="/usr/local/bin/configure" GIT="git" GIT_CLONE="$GIT clone -q" +GIT_SUBMODULE="$GIT submodule -q" MAKE="make" MKTEMP="mktemp" RM="/bin/rm -f" @@ -59,6 +60,11 @@ _git_tests() if [ $? -ne 0 ]; then echo "$repository: Could not clone" 1>&2 elif [ -d "$tmpdir/repository/doc" ]; then + #update submodules if any + [ -f "$tmpdir/repository/.gitmodules" ] && + (cd "$tmpdir/repository" && + $GIT submodule init && + $GIT submodule update) #generate documentation if available (cd "$tmpdir/repository" && $CONFIGURE &&