forked from HazemKhaled/Compile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
m2t.php
34 lines (31 loc) · 1.09 KB
/
m2t.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
require 'vendor/autoload.php';
define('WORK_DIR', __DIR__);
define('CACHE_DIR', WORK_DIR . DIRECTORY_SEPARATOR . 'cache');
define('BUILD_DIR', WORK_DIR . DIRECTORY_SEPARATOR . 'build');
define('TEMPLATE_DIR', WORK_DIR . DIRECTORY_SEPARATOR . 'template');
define('MAGENTO_DIR', WORK_DIR . DIRECTORY_SEPARATOR . 'magento');
define('ZIP_FILE', WORK_DIR . DIRECTORY_SEPARATOR . 'translations.zip');
define('DOWNLOADS_DIR', WORK_DIR . DIRECTORY_SEPARATOR . 'downloads');
define('SOURCE_DIR', WORK_DIR . DIRECTORY_SEPARATOR . 'source');
use M2t\Console\Command\Download;
use M2t\Console\Command\Package;
use M2t\Console\Command\Translate;
use M2t\Console\Command\Full;
use Symfony\Component\Console\Application;
try {
$application = new Application();
$application->add(new Download());
$application->add(new Translate());
$application->add(new Package());
$application->add(new Full());
$application->run();
} catch (\Exception $e) {
while ($e) {
echo $e->getMessage();
echo $e->getTraceAsString();
echo "\n\n";
$e = $e->getPrevious();
}
exit(1);
}