update script
This commit is contained in:
parent
0ed1ec7caa
commit
163db51767
19
bin/scan
19
bin/scan
@ -1,6 +1,23 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
$paths = [
|
||||
// as a root package or phar
|
||||
__DIR__.'/../vendor/autoload.php',
|
||||
// as a dependency from bin
|
||||
__DIR__.'/../autoload.php',
|
||||
// as a dependency from package folder
|
||||
__DIR__.'/../../../autoload.php',
|
||||
];
|
||||
function init_composer(array $paths) {
|
||||
foreach ($paths as $path) {
|
||||
if (file_exists($path)) {
|
||||
require_once $path;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!init_composer($paths)) die('Run `composer install` firstly.'.PHP_EOL);
|
||||
|
||||
use wapmorgan\Mp3Info\Mp3Info;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user