From: myon-guest Date: Wed, 6 Jul 2005 11:38:55 +0000 (+0000) Subject: * fix b0rked GetOptions call X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=4b2d0f37c3699d65dd84ed590b61d1c038e722e1;p=pgp-tools.git * fix b0rked GetOptions call * print out which keyid we complain about git-svn-id: svn://svn.debian.org/pgp-tools/trunk@115 b513b33f-fedd-0310-b452-c3deb5f4c849 --- diff --git a/gpgsigs/gpgsigs b/gpgsigs/gpgsigs index 0caf08f..7da3c1f 100755 --- a/gpgsigs/gpgsigs +++ b/gpgsigs/gpgsigs @@ -59,9 +59,10 @@ EOF my ($fromcharset, $charset, $recv_keys); +Getopt::Long::config('bundling'); GetOptions( - f => \$fromcharset, - t => \$charset, + '-f=s' => \$fromcharset, + '-t=s' => \$charset, r => \$recv_keys, help => sub { usage(*STDOUT, 0); }, version => sub { version(*STDOUT); exit 0;}, @@ -142,8 +143,8 @@ map { s/^0x//i; } @mykeys; if (!@mykeys || scalar @ARGV) { usage(*STDERR, 1); } -if (!grep { /^([0-9A-F]{16,16}|[0-9A-F]{8,8})$/ } @mykeys) { - print STDERR "Invalid keyid given\n"; +foreach my $falsekey (grep { $_ !~ /^([0-9A-F]{16,16}|[0-9A-F]{8,8})$/ } @mykeys) { + print STDERR "Invalid keyid $falsekey given\n"; usage(*STDERR, 1); }