magallanes/bin/mage

39 lines
992 B
Plaintext
Raw Normal View History

#!/usr/bin/env php
<?php
2013-11-05 17:12:09 +01: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.
*/
$timezone = ini_get('date.timezone');
if (empty($timezone)) {
date_default_timezone_set('UTC');
}
2011-11-22 12:16:06 +01:00
$baseDir = dirname(dirname(__FILE__));
2011-11-22 12:16:06 +01:00
2017-01-06 03:58:33 +01:00
define('MAGALLANES_VERSION', '1.0.7');
2013-12-18 00:31:04 +01:00
define('MAGALLANES_DIRECTORY', $baseDir);
2011-11-22 12:16:06 +01: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';
}
2016-03-18 14:12:43 +01:00
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 22:19:05 +01:00
exit((integer) $exitCode);