summaryrefslogtreecommitdiffstats
path: root/fedcli.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-05-25 05:28:34 +0800
committertrasher <trasher@x-tnd.be>2010-05-29 16:44:57 +0800
commit9e248007a16986a02fbfc269addb01de07ee427b (patch)
treef5ace133c94721ec0fd665cbd0f9a2bbfb9b4dd1 /fedcli.php
parent886b1ca73cc20b7c266dd0a7da0e863b722c47df (diff)
add FedoraPkgdb->getCritPath()... well seems it doesn't work :(
Diffstat (limited to 'fedcli.php')
-rwxr-xr-xfedcli.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/fedcli.php b/fedcli.php
index a58d47a..ce9c31a 100755
--- a/fedcli.php
+++ b/fedcli.php
@@ -32,6 +32,7 @@ function Help() {
echo "fdcli command options\n";
echo "\tbranch: branch info\n";
echo "\tbranches: list branches\n";
+ echo "\tcritpath: list critical path\n";
echo "\tpackage: package info\n";
echo "\tversion: class version\n";
echo "Also try fdcli command --help\n";
@@ -71,6 +72,22 @@ function Branch() {
print_r($branch);
}
+function CritPath() {
+ $config = array(
+ //"branch" => array('short' => 'b', 'max' => 1, 'min' => 1, 'desc' => "branch name", 'default' => "devel"),
+ "debug" => array('short' => 'd', 'max' => 1, 'min' => 1, 'desc' => "debug level", 'default' => "0")
+ );
+ $args =& Console_Getargs::factory($config);
+
+ if (PEAR::isError($args)) {
+ die (Console_Getargs::getHelp($config));
+ }
+
+ $client = new FedoraPkgdb(array('debug' => intval($args->getValue('debug'))));
+ $branch = $client->getCritPath();
+ print_r($branch);
+}
+
function Package() {
$config = array(
"package" => array('short' => 'p', 'max' => 1, 'min' => 1, 'desc' => "package name"),
@@ -127,6 +144,7 @@ $cmd = array_shift($_SERVER['argv']);
switch ($cmd) {
case 'branches': Branches(); break;
case 'branch': Branch(); break;
+ case 'critpath': CritPath(); break;
case 'package': Package(); break;
case 'version': Version(); break;
default: Help();