forked from consolidation/robo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
robo
executable file
·27 lines (26 loc) · 862 Bytes
/
robo
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
#!/usr/bin/env php
<?php
/**
* if we're running from phar load the phar autoload,
* else let the script 'robo' search for the autoloader
*/
if (strpos(basename(__FILE__), 'phar')) {
require_once 'phar://robo.phar/vendor/autoload.php';
} else {
if (file_exists(__DIR__.'/vendor/autoload.php')) {
require_once __DIR__.'/vendor/autoload.php';
} elseif (file_exists(__DIR__.'/../../autoload.php')) {
require_once __DIR__ . '/../../autoload.php';
} else {
require_once 'phar://robo.phar/vendor/autoload.php';
}
}
$_SERVER['CWD'] = getcwd();
if( file_exists( $_SERVER['HOME'].'/.mpm/RoboFile.php' ) )
{
$_SERVER['argv'][] = '--load-from';
$_SERVER['argv'][] = $_SERVER['HOME'].'/.mpm/RoboFile.php';
}
$runner = new \Robo\Runner();
$statusCode = $runner->execute($_SERVER['argv']);
exit($statusCode);