mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Tools(listFontWithLang.pl): Prohibit inserting multiple entries of same command line option
This commit is contained in:
parent
544e5859d3
commit
e3ffbc53cb
@ -75,6 +75,18 @@ sub handleOptions($)
|
||||
while( my( $option, $value, $pretty ) = Getopt::Mixed::nextOption()) {
|
||||
if (defined($optionsDef{$option})) {
|
||||
my $fieldname = $optionsDef{$option}->{fieldname};
|
||||
if (exists($options{$fieldname})) {
|
||||
print "Option $option already set\n";
|
||||
print "Value \"$value\" would overwrite ";
|
||||
if (ref($options{$fieldname}) eq "ARRAY") {
|
||||
print "\"" . join(',', @{$options{$fieldname}}) . "\"\n";
|
||||
}
|
||||
else {
|
||||
print "\"$options{$fieldname}\"\n";
|
||||
}
|
||||
$option = "h";
|
||||
$fieldname = "help";
|
||||
}
|
||||
if ($option eq "h") {
|
||||
print "Syntax: $0 options xxxx ...\n";
|
||||
print "Available options:\n";
|
||||
|
Loading…
Reference in New Issue
Block a user