forked from kenjis/ci-phpunit-test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.php
More file actions
32 lines (26 loc) · 659 Bytes
/
update.php
File metadata and controls
32 lines (26 loc) · 659 Bytes
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
<?php
/**
* Part of ci-phpunit-test
*
* @author Kenji Suzuki <https://github.com/kenjis>
* @license MIT License
* @copyright 2015 Kenji Suzuki
* @link https://github.com/kenjis/ci-phpunit-test
*/
require __DIR__ . '/Installer.php';
$silent = false;
$app_dir = 'application';
// php update.php -s
if (isset($argv[1]) && $argv[1] === '-s') {
$silent = true;
// php update.php -s app
if (isset($argv[2]) && is_dir($argv[2])) {
$app_dir = $argv[2];
}
}
// php update.php app
if (isset($argv[1]) && is_dir($argv[1])) {
$app_dir = $argv[1];
}
$installer = new Installer($silent);
$installer->update($app_dir);