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

require_once __DIR__ . '/../vendor/autoload.php';

$logo = <<<LOGO
  __             _                           
 / _| __ _ _   _| | __ _ _ __   ___ ___ _ __ 
| |_ / _` | | | | |/ _` | '_ \ / __/ _ | '__|
|  _| (_| | |_| | | (_| | | | | (_|  __| |   
|_|  \__,_|\__,_|_|\__,_|_| |_|\___\___|_|   

LOGO;

\Faulancer\Console\Output::writeLine($logo, 'notice');

if (!file_exists(getcwd() . '/bootstrap.php')) {
    throw new \Exception('No');
}

/** @var array $config */
require_once getcwd() . '/bootstrap.php';

try {
    $argumentParser = new \Faulancer\Console\ArgumentParser($argv, $config);
} catch (\Exception $e) {
    \Faulancer\Console\Output::writeLine('Error: ' . $e->getMessage(), 'error');
}

\Faulancer\Console\Output::writeEmptyLine();