From a41dbb97fc2b584a0c6f58961f94024782e47577 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 11 May 2010 16:24:04 +0200 Subject: efa: Add option checking for --exclude --- bin/efa | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/efa b/bin/efa index 3ce7da9..a1a0f1f 100755 --- a/bin/efa +++ b/bin/efa @@ -300,14 +300,19 @@ if (@exclude) { zug s-bahn u-bahn stadtbahn tram stadtbus regionalbus schnellbus seilbahn schiff ast sonstige /; + my $ok = 0; foreach my $exclude_type (@exclude) { for my $map_id (0 .. $#mapping) { if ($exclude_type eq $mapping[$map_id]) { $post{"inclMOT_$map_id"} = undef; + $ok = 1; } } } + if (not $ok) { + die("Invalid argument. See manpage for --exclude usage\n"); + } } if (defined($maxinter)) { -- cgit v1.2.3