#!/usr/bin/env php
<?php
/**
 * This file is part of the Imbo package
 *
 * (c) Christer Edvartsen <cogo@starzinger.net>
 *
 * For the full copyright and license information, please view the LICENSE file that was
 * distributed with this source code.
 */

chdir(dirname(__DIR__));

$autoloaderFound = false;
$paths = ['../../autoload.php', 'vendor/autoload.php'];

// Include the autoloader generated by composer
foreach ($paths as $path) {
    if (is_file($path)) {
        $autoloaderFound = true;
        require $path;
        break;
    }
}

if (!$autoloaderFound) {
    echo 'Could not find autoload.php' . PHP_EOL;
    die(1);
}

// Run the application
$cli = new ImboCli\Application();
$cli->run();
