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

namespace Sphpdox\Bin;

$files = array(
      __DIR__ . '/../../vendor/autoload.php',
      __DIR__ . '/../../../../autoload.php'
    );

foreach ($files as $file) {
    if (file_exists($file)) {
        require $file;
        define('SPHPDOX_COMPOSER_INSTALL', $file);
        break;
    }
}

if (!defined('SPHPDOX_COMPOSER_INSTALL')) {
    die(
      'You need to set up the project dependencies using the following commands:' . PHP_EOL .
      'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
      'php composer.phar install' . PHP_EOL
      );
}

use Sphpdox\Process;
use Symfony\Component\Console\Shell;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputOption;

$application = new Application('sphpdoc', '1.0.0-alpha');
$application->add(new Process());
$application->run();
