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

if (file_exists(__DIR__ . '/../../../autoload.php')) {
    // The path when installed globally
    require __DIR__ . '/../../../autoload.php';
} elseif (file_exists(__DIR__ . '/../vendor/autoload.php')) {
    // The path when installed locally
    require __DIR__ . '/../vendor/autoload.php';
} else {
    throw new Exception('Autoloader not found.');
}

use GregPriday\CopyTree\Command\CopyTreeCommand;
use Symfony\Component\Console\Application;

$application = new Application();
$application->add(new CopyTreeCommand());
$application->setDefaultCommand('app:copy-tree', true);
$application->run();
