Files
Magallanes/bin/mage
T

37 lines
945 B
PHP
Raw Normal View History

#!/usr/bin/env php
<?php
2013-11-05 14:12:09 -02:00
/*
* This file is part of the Magallanes package.
*
* (c) Andrés Montañez <andres@andresmontanez.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
date_default_timezone_set('UTC');
2011-11-22 09:16:06 -02:00
$baseDir = dirname(dirname(__FILE__));
2011-11-22 09:16:06 -02:00
2015-02-21 14:39:51 -02:00
define('MAGALLANES_VERSION', '1.0.4');
2013-12-17 21:31:04 -02:00
define('MAGALLANES_DIRECTORY', $baseDir);
2011-11-22 09:16:06 -02:00
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
require_once __DIR__ . '/../vendor/autoload.php';
} else if (file_exists(__DIR__ . '/../../../autoload.php')) {
2014-12-28 14:45:13 +01:00
require_once __DIR__ . '/../../../autoload.php';
} else {
require_once $baseDir . '/Mage/Autoload.php';
$loader = new \Mage\Autoload();
spl_autoload_register(array($loader, 'autoLoad'));
}
// Clean arguments
array_shift($argv);
// Run Magallanes
$console = new Mage\Console;
$exitCode = $console->run($argv);
2014-11-01 19:19:05 -02:00
exit((integer) $exitCode);