forked from GeekQuerxy/SSPanelSubcribe
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheasyswoole
50 lines (38 loc) · 1.23 KB
/
easyswoole
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
#!/usr/bin/env php
<?php
use EasySwoole\EasySwoole\Command\CommandRunner;
defined('IN_PHAR') or define('IN_PHAR', boolval(\Phar::running(false)));
defined('RUNNING_ROOT') or define('RUNNING_ROOT', realpath(getcwd()));
defined('EASYSWOOLE_ROOT') or define('EASYSWOOLE_ROOT', IN_PHAR ? \Phar::running() : realpath(getcwd()));
$file = EASYSWOOLE_ROOT . '/vendor/autoload.php';
if (file_exists($file)) {
require $file;
} else {
die("include composer autoload.php fail\n");
}
$appprofile = EASYSWOOLE_ROOT . '/appprofile.php';
if (file_exists($appprofile)) {
require_once $appprofile;
} else {
die("include appprofile.php fail\n");
}
if (file_exists(EASYSWOOLE_ROOT . '/bootstrap.php')) {
require_once EASYSWOOLE_ROOT . '/bootstrap.php';
}
echo <<<LOGO
o o-o o o o o
| / | | o | \ /
o--o o-o o-o OO o-o o o O-o o-o o-o O-o o-o O
| | |-' |-' | \ | | | | | | | | | | |-' / \
o--O o-o o-o o o o--o o--o o-o o-o o | o-o o-o o o
|
o--o
Started...
LOGO;
$args = $argv;
//trim first command
array_shift($args);
$ret = CommandRunner::getInstance()->run($args);
if (!empty($ret)) {
echo $ret . "\n";
}