-
Notifications
You must be signed in to change notification settings - Fork 0
/
add-git-submodules.php
70 lines (63 loc) · 1.76 KB
/
add-git-submodules.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
$submodule = array(
array(
'path' => 'system',
'url' => 'https://github.com/kohana/core.git',
),
array(
'path' => 'modules/auth',
'url' => 'https://github.com/kohana/auth.git',
),
array(
'path' => 'modules/cache',
'url' => 'https://github.com/kohana/cache.git',
),
array(
'path' => 'modules/codebench',
'url' => 'https://github.com/kohana/codebench.git',
),
array(
'path' => 'modules/database',
'url' => 'https://github.com/kohana/database.git',
),
array(
'path' => 'modules/image',
'url' => 'https://github.com/kohana/image.git',
),
array(
'path' => 'modules/minion',
'url' => 'https://github.com/kohana/minion.git',
),
array(
'path' => 'modules/orm',
'url' => 'https://github.com/kohana/orm.git',
),
array(
'path' => 'modules/unittest',
'url' => 'https://github.com/kohana/unittest.git',
),
array(
'path' => 'modules/userguide',
'url' => 'https://github.com/kohana/userguide.git',
),
array(
'path' => 'modules/bootstrap',
'url' => 'https://github.com/ich/kohana-bootstrap.git',
),
array(
'path' => 'modules/client',
'url' => 'https://github.com/ich/kohana-client-controller.git',
),
array(
'path' => 'modules/twig',
'url' => 'https://github.com/ich/kohana-twig.git',
),
);
foreach ($submodule as $module) {
$command = "git submodule add {$module['url']} {$module['path']}";
echo "{$command}\n" . `{$command}`;
}
$command = "git submodule update --init --recursive";
echo "{$command}\n" . `{$command}`;
$command = 'rm ' . __FILE__;
echo "{$command}\n" . `{$command}`;