Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
wapmorgan committed Mar 19, 2018
1 parent 0ed1ec7 commit 163db51
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion bin/scan
Original file line number Diff line number Diff line change
@@ -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;

Expand Down

0 comments on commit 163db51

Please sign in to comment.