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

if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
    require __DIR__ . '/../vendor/autoload.php';
} elseif (file_exists(getcwd() . '/vendor/autoload.php')) {
    require getcwd() . '/vendor/autoload.php';
} else {
    echo 'Couldn\'t find composer, make sure to run script in project root!' . PHP_EOL;
    exit(1);
}

array_shift($argv);

$application = (new \DepDoc\Application\ApplicationBuilder())->build();
$exitCode = $application->run();
exit($exitCode);
