aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2020-01-29 11:21:13 +0100
committerJuan Quintela <quintela@redhat.com>2020-02-13 11:31:58 +0100
commit1a920d2b633e13df8961328b3b3e128989a34570 (patch)
tree01efb09c61999f4eb4ce223346732f5a3b8767f5
parente022d47388e339d9287a17d8072d4c2e8a9a427e (diff)
downloadqemu-1a920d2b633e13df8961328b3b3e128989a34570.zip
qemu-1a920d2b633e13df8961328b3b3e128989a34570.tar.gz
qemu-1a920d2b633e13df8961328b3b3e128989a34570.tar.bz2
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 <quintela@redhat.com> --- v1->v2: patchw insists in not using modules
-rwxr-xr-xscripts/git-submodule.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index 98ca0f2..65ed877 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"