diff options
Diffstat (limited to 'fedcli.php')
-rwxr-xr-x | fedcli.php | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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(); |