-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathstub.php
38 lines (33 loc) · 1.14 KB
/
stub.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
#!/usr/bin/env php
<?php
Phar::mapPhar();
/**
* stub.php
*
* PHP version 57
*
* @author Tim Wagner <[email protected]>
* @copyright 2016 TechDivision GmbH <[email protected]>
* @license https://opensource.org/licenses/MIT
* @link https://github.com/techdivision/import-cli-simple
* @link http://www.techdivision.com
*/
// 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 $autoloadFile = 'phar://import-cli-simple.phar/vendor/autoload.php';
} else {
if (file_exists(__DIR__.'/vendor/autoload.php')) {
require_once $autoloadFile = __DIR__.'/vendor/autoload.php';
} elseif (file_exists(__DIR__.'/../../autoload.php')) {
require_once $autoloadFile = __DIR__ . '/../../autoload.php';
} else {
require_once $autoloadFile = 'phar://import-cli-simple.phar/vendor/autoload.php';
}
}
// initialize the vendor directory
$vendorDir = dirname($autoloadFile);
// bootstrap and run the application
require dirname($vendorDir) . '/bootstrap.php';
// stop the compiler
__HALT_COMPILER(); ?>