diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-14 13:44:52 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-15 09:03:24 +0200 |
commit | 633051d095cb8580fb99c625009f965a1efd18f1 (patch) | |
tree | 4cd36f3e8e1634c25c3b03b9eaa72adddb782560 | |
parent | ce45f45dfb8232b8ce599745ebd3bb7888fc4ea0 (diff) |
init-repository: Support submodules more than one dir deep
Change-Id: I8783ded72032dda42bc24a855e190e0a2e699b01
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
-rwxr-xr-x | init-repository | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/init-repository b/init-repository index 86d05d42..856d877f 100755 --- a/init-repository +++ b/init-repository @@ -476,10 +476,11 @@ sub git_clone_all_submodules $self->git_clone_one_submodule($1, $2); if ($1 eq "qtwebengine") { $self->exe('git', 'submodule', 'update', $1); + my $orig_cwd = getcwd(); chdir($1) or confess "chdir $1: $OS_ERROR"; $self->exe('git', 'submodule', 'init'); $self->git_clone_all_submodules; - chdir("..") or confess "chdir $1: $OS_ERROR"; + chdir("$orig_cwd") or confess "chdir $orig_cwd: $OS_ERROR"; } } } @@ -560,6 +561,7 @@ sub git_clone_one_submodule $self->exe('git', 'clone', @reference_args, ($mirror ? $mirror : $url), $submodule); } + my $orig_cwd = getcwd(); chdir($submodule) or confess "chdir $submodule: $OS_ERROR"; $self->exe('git', 'config', 'remote.origin.url', $url); @@ -588,7 +590,7 @@ sub git_clone_one_submodule } } - chdir("..") or confess "cd ..: $OS_ERROR"; + chdir($orig_cwd) or confess "cd $orig_cwd: $OS_ERROR"; return; } |