Skip to content

Commit 24c19d2

Browse files
committed
Improve example output
1 parent 825b04e commit 24c19d2

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

bin/install.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,17 @@ public function __construct() {
2828
'repos' => 'codeigniter3-translations',
2929
'name' => 'Translations for CodeIgniter System Messages',
3030
'dir' => 'language',
31+
'example_branch' => '3.0.0',
3132
),
32-
'codeigniter-restserver' => array(
33+
'restserver' => array(
3334
'site' => 'github',
3435
'user' => 'chriskacerguis',
3536
'repos' => 'codeigniter-restserver',
3637
'name' => 'CodeIgniter REST Server',
3738
'dir' => array('config', 'controllers', 'language', 'libraries', 'views'),
3839
'pre' => 'application/',
3940
'msg' => 'See https://github.com/chriskacerguis/codeigniter-restserver',
41+
'example_branch' => '2.7.2',
4042
),
4143
'matches-cli' => array(
4244
'site' => 'github',
@@ -45,6 +47,7 @@ public function __construct() {
4547
'name' => 'Codeigniter Matches CLI',
4648
'dir' => array('config', 'controllers', 'views'),
4749
'msg' => 'See http://avenirer.github.io/codeigniter-matches-cli/',
50+
'example_branch' => 'master',
4851
),
4952
'hmvc-modules' => array(
5053
'site' => 'github',
@@ -53,6 +56,7 @@ public function __construct() {
5356
'name' => 'CodeIgniter HMVC Modules (jenssegers)',
5457
'dir' => array('core', 'third_party'),
5558
'msg' => 'See https://github.com/jenssegers/codeigniter-hmvc-modules#installation',
59+
'example_branch' => 'master',
5660
),
5761
'modular-extensions-hmvc' => array(
5862
'site' => 'bitbucket',
@@ -61,6 +65,7 @@ public function __construct() {
6165
'name' => 'Modular Extensions - HMVC (wiredesignz)',
6266
'dir' => array('core', 'third_party'),
6367
'msg' => 'See https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc',
68+
'example_branch' => 'codeigniter-3.x',
6469
),
6570
'ion-auth' => array(
6671
'site' => 'github',
@@ -72,6 +77,7 @@ public function __construct() {
7277
'migrations', 'models', 'sql', 'views'
7378
),
7479
'msg' => 'See http://benedmunds.com/ion_auth/',
80+
'example_branch' => '2',
7581
),
7682
'filename-checker' => array(
7783
'site' => 'github',
@@ -80,6 +86,7 @@ public function __construct() {
8086
'name' => 'CodeIgniter3 Filename Checker',
8187
'dir' => 'controllers',
8288
'msg' => 'See https://github.com/kenjis/codeigniter3-filename-checker',
89+
'example_branch' => 'master',
8390
),
8491
);
8592
}
@@ -97,13 +104,10 @@ public function usage($self)
97104
$msg .= ' php install.php <package> <version/branch>' . PHP_EOL;
98105
$msg .= PHP_EOL;
99106
$msg .= 'Examples:' . PHP_EOL;
100-
$msg .= " php $self translations 3.0.0" . PHP_EOL;
101-
$msg .= " php $self translations develop" . PHP_EOL;
102-
$msg .= " php $self matches-cli master" . PHP_EOL;
103-
$msg .= " php $self hmvc-modules master" . PHP_EOL;
104-
$msg .= " php $self modular-extensions-hmvc codeigniter-3.x" . PHP_EOL;
105-
$msg .= " php $self ion-auth 2" . PHP_EOL;
106-
$msg .= " php $self filename-checker master" . PHP_EOL;
107+
108+
foreach ($this->packages as $key => $value) {
109+
$msg .= " php $self $key " . $value['example_branch'] . PHP_EOL;
110+
}
107111

108112
return $msg;
109113
}

0 commit comments

Comments
 (0)