pharcmd: $(builddir)/phar.phar
$(builddir)/phar.phar: $(srcdir)/phar/*.inc $(srcdir)/phar/*.php
- php -d phar.readonly=0 $(srcdir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x CVS -p optional -s $(srcdir)/phar/phar.php -h sha1 $(srcdir)/phar/
+ php -d phar.readonly=0 $(srcdir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x CVS -p 0 -s $(srcdir)/phar/phar.php -h sha1 $(srcdir)/phar/
@chmod +x $(builddir)/phar.phar
static function cli_arg_typ_loader($arg)
{
- if ($arg == 'auto' || $arg == 'optional')
+ if (($arg == '0' || $arg == '1') && !file_exists($arg))
{
$found = NULL;
foreach(split("\n", `pear list-files PHP_Archive`) as $ent)
}
if (!isset($found)) {
echo "Pear package PHP_Archive or Archive.php class file not found.\n";
- if ($arg != 'optional')
+ if ($arg != '0')
{
exit(1);
}
'f' => array('typ'=>'pharnew', 'val'=>NULL, 'required'=>1, 'inf'=>'<file> Specifies the phar file to work on.'),
'h' => array('typ'=>'select', 'val'=>NULL, 'inf'=>'<method> Selects the hash algorithmn.', 'select'=>array('md5'=>'MD5','sha1'=>'SHA1','sha256'=>'SHA256','sha512'=>'SHA512')),
'i' => array('typ'=>'regex', 'val'=>NULL, 'inf'=>'<regex> Specifies a regular expression for input files.'),
- 'p' => array('typ'=>'loader', 'val'=>NULL, 'inf'=>'<loader> Location of PHP_Archive class file (pear list-files PHP_Archive). You can use \'auto\' or \'optional\' to locate it automatically using the mentioned pear command. When using \'optional\' the command does not error out when the class file cannot be located.'),
+ 'p' => array('typ'=>'loader', 'val'=>NULL, 'inf'=>'<loader> Location of PHP_Archive class file (pear list-files PHP_Archive). You can use \'0\' or \'1\' to locate it automatically using the mentioned pear command. When using \'0\' the command does not error out when the class file cannot be located.'),
's' => array('typ'=>'file', 'val'=>NULL, 'inf'=>'<stub> Select the stub file (excluded from list of input files/dirs).'),
'x' => array('typ'=>'regex', 'val'=>NULL, 'inf'=>'<regex> Regular expression for input files to exclude.'),
'' => array('typ'=>'any', 'val'=>NULL, 'required'=>1, 'inf'=>' Any number of input files and directories.'),
'p' => array(
'typ' => 'loader',
'val' => NULL,
- 'inf' => '<loader> Location of PHP_Archive class file (pear list-files PHP_Archive). You can use \'auto\' or \'optional\' to locate it automatically using the mentioned pear command. When using \'optional\' the command does not error out when the class file cannot be located.',
+ 'inf' => '<loader> Location of PHP_Archive class file (pear list-files PHP_Archive). You can use \'0\' or \'1\' to locate it automatically using the mentioned pear command. When using \'0\' the command does not error out when the class file cannot be located.',
),
's' => array(
'typ' => 'file',
*/
static function cli_arg_typ_loader($arg, $cfg, $key)
{
- if ($arg == 'auto' || $arg == 'optional') {
+ if (($arg == '0' || $arg == '1') && !file_exists($arg)) {
$found = NULL;
foreach(split("\n", `pear list-files PHP_Archive`) as $ent) {
$matches = NULL;
}
if (!isset($found)) {
$msg = "Pear package PHP_Archive or Archive.php class file not found.\n";
- if ($arg == 'optional') {
+ if ($arg == '0') {
self::notice($msg);
} else {
self::error($msg);