-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgestao
executable file
·50 lines (42 loc) · 1.47 KB
/
gestao
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env php
<?php
$_ENV['HOME'] = getenv('HOME');
$_ENV['VAGRANT_DOTFILE_PATH'] = gestao_path().DIRECTORY_SEPARATOR;
if (file_exists(__DIR__.'/vendor/autoload.php')) {
require __DIR__.'/vendor/autoload.php';
} else {
require __DIR__.'/../../autoload.php';
}
function gestao_path()
{
if (isset($_SERVER['HOME'])) {
return $_SERVER['HOME'].'/.gestao';
} else {
return $_SERVER['HOMEDRIVE'].$_SERVER['HOMEPATH'].DIRECTORY_SEPARATOR.'.gestao';
}
}
function gestao_path_vms()
{
return gestao_path().DIRECTORY_SEPARATOR.'machines';
}
function manifest()
{
return json_decode(@file_get_contents(__DIR__."/manifest.json"));
}
$app = new Symfony\Component\Console\Application('Gestao TI Console', manifest()->version);
$app->add(new GestaoTI\Console\InitCommand);
$app->add(new GestaoTI\Console\SelfUpdateCommand);
$app->add(new GestaoTI\Console\VmInitCommand);
$app->add(new GestaoTI\Console\VmUpCommand);
$app->add(new GestaoTI\Console\VmDestroyCommand);
$app->add(new GestaoTI\Console\VmUpdateCommand);
$app->add(new GestaoTI\Console\VmHaltCommand);
$app->add(new GestaoTI\Console\VmProvisionCommand);
$app->add(new GestaoTI\Console\VmStatusCommand);
$app->add(new GestaoTI\Console\VmEditCommand);
$app->add(new GestaoTI\Console\VmReloadCommand);
$app->add(new GestaoTI\Console\VmRunCommand);
$app->add(new GestaoTI\Console\VmSshCommand);
$app->add(new GestaoTI\Console\VmResumeCommand);
$app->add(new GestaoTI\Console\VmBuildCommand);
$app->run();