This repository has been archived by the owner on May 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makelos
executable file
·59 lines (48 loc) · 1.62 KB
/
makelos
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
51
52
53
54
55
56
57
58
59
#!/usr/bin/env php
<?php
array_shift($argv);
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);
$task = empty($argv) ? false : array_shift($argv);
$task = !in_array($task,get_class_methods('Makelos')) ? 'help' : $task;
include(dirname(__FILE__).str_repeat(DS.'..', 4).DS.'config'.DS.'config.php');
class Makelos
{
var $repository = 'http://svn.uranus.bermilabs.com/plugins/translation';
function help()
{
echo "\nValid commands are ".join(', ', get_class_methods('Makelos'))."\n";
}
function test($options = array())
{
}
function install()
{
$Installer =& $this->_getInstaller();
$Installer->install();
}
function uninstall()
{
$Installer =& $this->_getInstaller();
$Installer->uninstall();
}
function &_getInstaller()
{
$plugin_dir = AK_BASE_DIR.DS.'app'.DS.'vendor'.DS.'plugins'.DS.'translation';
$installer_file = $plugin_dir.DS.'installer'.DS.'translation_installer.php';
require_once($installer_file);
$Installer =& new TranslationInstaller();
return $Installer;
}
function _includeDependencies()
{
require_once(AK_LIB_DIR.DS.'Ak.php');
require_once(AK_LIB_DIR.DS.'AkObject.php');
require_once(AK_LIB_DIR.DS.'AkInflector.php');
require_once(AK_LIB_DIR.DS.'AkPlugin.php');
require_once(AK_LIB_DIR.DS.'AkPlugin/AkPluginManager.php');
require_once(AK_LIB_DIR.DS.'AkInstaller.php');
require_once(AK_LIB_DIR.DS.'utils'.DS.'generators'.DS.'AkelosGenerator.php');
}
}
$Makelos = new Makelos();
$Makelos->$task(@$argv);