コード例 #1
0
ファイル: manager.php プロジェクト: bermi/akelos
 private function _updateUsingLocalDirectory($name)
 {
     AkConsole::displayError(Ak::t('Updating from local targets it\'s not supported yet. Please use install --force instead.'), true);
 }
コード例 #2
0
ファイル: plugin.php プロジェクト: bermi/akelos
if ($command == 'test') {
    $options = get_console_options_for('Test plugin', array(CONSOLE_GETARGS_PARAMS => array('min' => 1, 'max' => 1, 'short' => 'p', 'desc' => "Specify the plugin name you wish to test"), 'phpbin' => array('short' => 'b', 'max' => 1, 'min' => 1, 'desc' => 'Path to the php binary', 'default' => '/usr/bin/env php')));
    if (empty($options['parameters'])) {
        AkConsole::displayError("You must supply a plugin name.", true);
    }
    $plugin = $options['parameters'];
    $plugin_name = basename($plugin);
    $test_file = AK_PLUGINS_DIR . DS . $plugin_name . DS . 'test' . DS . $plugin_name . '.php';
    if (file_exists($test_file)) {
        $exec_command = $options['phpbin'] . ' ' . $test_file;
        passthru($exec_command);
    } else {
        echo "The test file {$test_file} does not exist.";
        die("\n");
    }
}
if ($command == 'help') {
    $options = get_console_options_for('Plugin help', array(CONSOLE_GETARGS_PARAMS => array('min' => 1, 'max' => 1, 'short' => 'p', 'desc' => "Specify a plugin name."), 'phpbin' => array('short' => 'b', 'max' => 1, 'min' => 1, 'desc' => 'Path to the php binary', 'default' => '/usr/bin/env php')));
    if (empty($options['parameters'])) {
        AkConsole::displayError("You must supply a plugin name.", true);
    }
    $plugin = $options['parameters'];
    $plugin_name = basename($plugin);
    $help_file = AK_PLUGINS_DIR . DS . $plugin_name . DS . 'README';
    if (file_exists($help_file)) {
        echo file_get_contents($help_file) . "\n";
    } else {
        echo "Could not find a README help file for the {$plugin_name} plugin.";
        die("\n");
    }
}