Long argument style working
This commit is contained in:
parent
bd676d52e8
commit
249a17b809
Binary file not shown.
@ -53,7 +53,7 @@ EOD;
|
||||
$options = new Console_Getopt();
|
||||
|
||||
$shortoptions = "hV";
|
||||
$longoptions = array("warning", "file", "md5");
|
||||
$longoptions = array("warning", "file=", "md5");
|
||||
|
||||
$args = $options->readPHPArgv();
|
||||
$ret = $options->getopt($args, $shortoptions, $longoptions);
|
||||
@ -78,6 +78,11 @@ if(sizeof($opts) > 0)
|
||||
case 'V':
|
||||
print_version();
|
||||
break;
|
||||
|
||||
case '--file':
|
||||
$filename = $o[1];
|
||||
echo $filename . "\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user