update script

This commit is contained in:
wapmorgan 2018-03-19 22:59:53 +03:00
parent 0ed1ec7caa
commit 163db51767

View File

@ -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;