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

$files = [
    __DIR__.'/../vendor/autoload.php',
    __DIR__.'/../../../autoload.php',
    __DIR__.'/../autoload.php'
];

$composerInstall = false;

foreach ($files as $file) {
    if (file_exists($file)) {
        require $file;
        $composerInstall = true;
        break;
    }
}

if (!$composerInstall) {
    echo 'You must set up the dependencies, run the following commands:'. PHP_EOL .
         'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
         'php composer.phar install' . PHP_EOL;
    exit(1);
}

unset($composerInstall, $files, $file);

require_once(realpath(dirname(__FILE__) . '/..') . '/src/pho.php');
