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

error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

function includeIfExists($file)
{
    if (file_exists($file)) {
        return include $file;
    }
}

if (!includeIfExists(__DIR__.'/../vendor/autoload.php') 
	&& !includeIfExists(__DIR__.'/../../../autoload.php')) {
    die(
        'You need to set up the project dependencies, run the following commands:' . PHP_EOL .
        'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
        'php composer.phar install' . PHP_EOL
    );
}

$dami = new Dami\Cli\DamiApplication();
$dami->run();
