#!/usr/bin/php
<?php

/*
 * This file is part of composer/satis.
 *
 * (c) Composer <https://github.com/composer>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */

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

if ((!$loader = includeIfExists(__DIR__ . '/../src/Composer/Satis/autoload.php')) && (!$loader = includeIfExists('/usr/share/php/Composer/Satis/autoload.php'))) {
    print('You must set up the project dependencies using Composer before you can use Satis.');
    exit(1);
}

$application = new Composer\Satis\Console\Application();
$application->run();
