From: Juan Quintela Date: Wed, 29 Jan 2020 10:21:13 +0000 (+0100) Subject: git: Make submodule check only needed modules X-Git-Tag: v5.0.0-rc0~90^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a920d2b633e13df8961328b3b3e128989a34570;p=thirdparty%2Fqemu.git git: Make submodule check only needed modules If one is compiling more than one tree from the same source, it is possible that they need different submodules. Change the check to see that all modules that we are interested in are updated, discarding the ones that we don't care about. Signed-off-by: Juan Quintela --- v1->v2: patchw insists in not using modules --- diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index 98ca0f2737a..65ed877aefd 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -59,10 +59,14 @@ status) fi test -f "$substat" || exit 1 - CURSTATUS=$($GIT submodule status $modules) - OLDSTATUS=$(cat $substat) - test "$CURSTATUS" = "$OLDSTATUS" - exit $? + for module in $modules; do + CURSTATUS=$($GIT submodule status $module) + OLDSTATUS=$(cat $substat | grep $module) + if test "$CURSTATUS" != "$OLDSTATUS"; then + exit 1 + fi + done + exit 0 ;; update) if test -z "$maybe_modules"