Long argument style working

This commit is contained in:
jackbenny committed 2013-04-14 00:08:39 +02:00
1 parent bd676d52e8
commit 249a17b809
2 files changed
+6 -1

No files matched your search

Binary file not shown.
+6 -1
View File
@@ -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;
}
}
}