2013-06-18 02:17:31 +02:00
|
|
|
#!/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.
|
|
|
|
*/
|
2015-04-16 09:53:44 +02:00
|
|
|
$timezone = ini_get('date.timezone');
|
|
|
|
if (empty($timezone)) {
|
2015-03-16 13:33:30 +01:00
|
|
|
date_default_timezone_set('UTC');
|
|
|
|
}
|
2011-11-22 12:16:06 +01:00
|
|
|
|
2013-06-18 02:17:31 +02: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
|
|
|
|
2015-01-05 14:30:41 +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';
|
2014-09-13 21:29:40 +02:00
|
|
|
}
|
|
|
|
|
2016-03-18 14:12:43 +01:00
|
|
|
require_once $baseDir . '/Mage/Autoload.php';
|
|
|
|
$loader = new \Mage\Autoload();
|
|
|
|
spl_autoload_register(array($loader, 'autoLoad'));
|
|
|
|
|
2013-06-18 02:17:31 +02:00
|
|
|
// Clean arguments
|
|
|
|
array_shift($argv);
|
|
|
|
|
|
|
|
// Run Magallanes
|
2013-11-06 15:44:05 +01:00
|
|
|
$console = new Mage\Console;
|
2014-03-16 17:31:36 +01:00
|
|
|
$exitCode = $console->run($argv);
|
|
|
|
|
2014-11-01 22:19:05 +01:00
|
|
|
exit((integer) $exitCode);
|