2001-04-17 01:17:59 +00:00
|
|
|
#!@prefix@/bin/php -Cq
|
2001-10-31 05:39:11 +00:00
|
|
|
<?php // -*- PHP -*-
|
2001-05-22 16:21:02 +00:00
|
|
|
//
|
|
|
|
// +----------------------------------------------------------------------+
|
2001-12-11 15:32:16 +00:00
|
|
|
// | PHP Version 4 |
|
2001-05-22 16:21:02 +00:00
|
|
|
// +----------------------------------------------------------------------+
|
2001-12-11 15:32:16 +00:00
|
|
|
// | Copyright (c) 1997-2002 The PHP Group |
|
2001-05-22 16:21:02 +00:00
|
|
|
// +----------------------------------------------------------------------+
|
|
|
|
// | This source file is subject to version 2.02 of the PHP license, |
|
|
|
|
// | that is bundled with this package in the file LICENSE, and is |
|
|
|
|
// | available at through the world-wide-web at |
|
|
|
|
// | http://www.php.net/license/2_02.txt. |
|
|
|
|
// | If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
// | obtain it through the world-wide-web, please send a note to |
|
|
|
|
// | license@php.net so we can mail you a copy immediately. |
|
|
|
|
// +----------------------------------------------------------------------+
|
|
|
|
// | Authors: Stig Bakken <ssb@fast.no> |
|
|
|
|
// | Tomas V.V.Cox <cox@idecnet.com> |
|
|
|
|
// +----------------------------------------------------------------------+
|
|
|
|
//
|
2001-11-13 01:07:36 +00:00
|
|
|
|
2001-05-22 16:21:02 +00:00
|
|
|
require_once 'PEAR.php';
|
2001-10-31 05:39:11 +00:00
|
|
|
require_once 'PEAR/Common.php';
|
2001-10-29 14:15:43 +00:00
|
|
|
require_once 'PEAR/Registry.php';
|
2000-07-17 22:52:08 +00:00
|
|
|
|
2001-12-11 08:39:56 +00:00
|
|
|
error_reporting(E_ALL & ~E_NOTICE);
|
2000-07-17 22:52:08 +00:00
|
|
|
|
2002-01-30 12:20:12 +00:00
|
|
|
$subcommands = array(
|
|
|
|
'help' => 'help [command]',
|
|
|
|
'uninstall' => 'uninstall [-r] <package name>',
|
|
|
|
'package' => 'package [package info file]',
|
|
|
|
'info' => 'info',
|
|
|
|
'list' => 'list',
|
|
|
|
'show-config' => 'show-config',
|
2001-10-26 10:07:43 +00:00
|
|
|
);
|
2001-10-29 14:15:43 +00:00
|
|
|
|
|
|
|
$command_options = array(
|
2002-01-30 12:20:12 +00:00
|
|
|
"list" => "v",
|
|
|
|
"uninstall" => "fr",
|
2001-10-29 14:15:43 +00:00
|
|
|
);
|
|
|
|
|
2002-01-30 12:20:12 +00:00
|
|
|
include "pearcmd-common.php";
|
2001-10-31 05:39:11 +00:00
|
|
|
|
2002-01-30 12:20:12 +00:00
|
|
|
if (isset($subcommands[$command])) {
|
|
|
|
include "pearcmd-$command.php";
|
|
|
|
} elseif (!$store_default_config && !$store_user_config) {
|
|
|
|
usage();
|
2001-01-08 02:45:30 +00:00
|
|
|
}
|
|
|
|
|
2001-10-31 05:39:11 +00:00
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* tab-width: 4
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*/
|
2001-12-12 01:35:03 +00:00
|
|
|
|
2000-07-17 22:52:08 +00:00
|
|
|
?>
|