#!/usr/bin/env php
<?php

error_reporting(-1);
ini_set('display_errors', 1);


/**
 * This file is part of Bldr.io.
 *
 * (c) Aaron Scherer <aequasi@gmail.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

$autoloaders = [
    getcwd().'/vendor/autoload.php',
    __DIR__.'/../vendor/autoload.php',
    __DIR__.'/../../../autoload.php'
];

$loaded = [];
foreach ($autoloaders as $autoloader) {
    if (file_exists($autoloader)) {
        @$fileHash = sha1_file($autoloader);
        if (!in_array($fileHash, $loaded)) {
            require $autoloader;
            $loaded[] = $fileHash;
        }
    }
}

if (!sizeof($loaded)) {
    echo "Cannot find an autoloader file, have you executed the composer install command?\n";
    exit(1);
}

Bldr\Application::create();
