summaryrefslogtreecommitdiffstats
path: root/init-repository
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-08-15 22:21:24 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-09-23 20:29:12 +0200
commit0af9ceef917859cf0de83891b707a4ce967e7fbf (patch)
tree1512de7eb4b4a51fc1a7118c14e0882799bf4ca9 /init-repository
parent934651b7669b7665c0ddb76ad38441289b303719 (diff)
properly recurse submodule initialization
Change-Id: Icd438b9da9af0275dd508186a265bc211d9d01ce Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'init-repository')
-rwxr-xr-xinit-repository21
1 files changed, 11 insertions, 10 deletions
diff --git a/init-repository b/init-repository
index 17b2c07a..238de704 100755
--- a/init-repository
+++ b/init-repository
@@ -352,7 +352,7 @@ sub git_clone_all_submodules
my @modules = sort keys %include;
- $self->git_submodule_init(@modules);
+ $self->git_submodule_init(map { $subdirs{$_} } @modules);
# manually clone each repo here, so we can easily use reference repos, mirrors etc
my @configresult = qx(git config -l);
@@ -373,18 +373,19 @@ sub git_clone_all_submodules
foreach my $module (@modules) {
$self->git_clone_one_submodule($subdirs{$module}, $subbases{$module});
- if ($module eq "qtwebengine") {
- $self->exe('git', 'submodule', 'update', $module);
- my $orig_cwd = getcwd();
- chdir($module) or confess "chdir $module: $OS_ERROR";
- $self->exe('git', 'submodule', 'init');
- $self->git_clone_all_submodules($subbases{$module}, "all");
- chdir("$orig_cwd") or confess "chdir $orig_cwd: $OS_ERROR";
- }
}
if ($self->{update}) {
- $self->exe('git', 'submodule', 'update', '--recursive');
+ $self->exe('git', 'submodule', 'update');
+
+ foreach my $module (@modules) {
+ if (-f $module.'/.gitmodules') {
+ my $orig_cwd = getcwd();
+ chdir($module) or confess "chdir $module: $OS_ERROR";
+ $self->git_clone_all_submodules($subbases{$module}, "all");
+ chdir("$orig_cwd") or confess "chdir $orig_cwd: $OS_ERROR";
+ }
+ }
}
return;