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

use Symfony\Component\Console\Application;

$loader = __DIR__ . '/../vendor/autoload.php';

if (!file_exists($loader)) {
    die(
        'You must 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
    );
}

require $loader;

$application = new Application('Droid HipChat', '1.0.0');
$application->setCatchExceptions(true);
$application->add(new Droid\Plugin\Homebrew\Command\BrewInstallCommand());
$application->add(new Droid\Plugin\Homebrew\Command\BrewUninstallCommand());
$application->add(new Droid\Plugin\Homebrew\Command\BrewUnlinkCommand());
$application->add(new Droid\Plugin\Homebrew\Command\BrewTapCommand());
$application->add(new Droid\Plugin\Homebrew\Command\BrewUntapCommand());
$application->add(new Droid\Plugin\Homebrew\Command\CaskInstallCommand());
$application->add(new Droid\Plugin\Homebrew\Command\CaskUninstallCommand());
$application->run();
