コード例 #1
0
ファイル: plugin.php プロジェクト: joeymetal/v1
        echo " * {$repository}{$checked}\n";
    }
    die;
}
/**
 * Adds a repository to the default search list.
 */
if ($command == 'source') {
    array_shift($argv);
    $options = Ak::toArray($argv);
    if (empty($options)) {
        die("You need to provide at least one repository to add to the default search list.\n");
    }
    foreach ($options as $repository) {
        if (Ak::url_get_contents($repository, array('timeout' => 10))) {
            $PluginManager->addRepository($repository);
            echo "Added: {$repository}\n";
        } else {
            echo "Not added: Connection error for repository {$repository}.\n";
        }
    }
    die;
}
/**
 * Removes a repository to the default search list.
 */
if ($command == 'unsource') {
    array_shift($argv);
    $options = Ak::toArray($argv);
    if (empty($options)) {
        die("You need to provide at least one repository to remove from the default search list.\n");