summaryrefslogtreecommitdiffstats
path: root/fedcli.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-05-24 23:28:34 +0200
committerRemi Collet <fedora@famillecollet.com>2010-05-24 23:28:34 +0200
commit2ec0f85de586973a65e88194216810c9f2ad335e (patch)
treec3df214c47d339d49b03768cffa42140ffe0f43a /fedcli.php
parent423564807cbf345a16840acf31ef4bad3a527092 (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();