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

// Determine location of autoload.php and include it
if (file_exists(__DIR__ . '/../../autoload.php')) {
    require __DIR__ . '/../../autoload.php';
} else {
    require __DIR__ . '/vendor/autoload.php';
}

use Crafter\Installer\Commands\NewCommand;
use Crafter\Installer\Commands\Show\ShowFrameworksCommand;
use Crafter\Installer\Commands\UpdateCommand;
use Symfony\Component\Console\Application;

// Create the Application.
$app = new Application('Crafter installer', '0.1.4');

// Add commands to it.
$app->addCommands([
    new NewCommand,
    new ShowFrameworksCommand,
    new UpdateCommand
]);

$app->run();
