summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e9b8298)
* Document multiple key usage properly in synopsis
* Extend my copyright statement
* Version is now the svn revision
* Enable Id, Rev keywords
* Set it executable
git-svn-id: svn://svn.debian.org/pgp-tools/trunk@71
b513b33f-fedd-0310-b452-
c3deb5f4c849
# See the pod documentation at the end of this file for author,
# copyright, and licence information.
#
# See the pod documentation at the end of this file for author,
# copyright, and licence information.
#
# * better charset conversion
# * pod documentation
# * better charset conversion
# * pod documentation
use strict;
use warnings;
use strict;
use warnings;
+ my ($fd) = @_;
+
+ print $fd <<EOF;
gpgsigs $VERSION - http://pgp-tools.alioth.debian.org/
(c) 2004 Uli Martens <uli\@youam.net>
gpgsigs $VERSION - http://pgp-tools.alioth.debian.org/
(c) 2004 Uli Martens <uli\@youam.net>
- (c) 2004 Peter Palfrader <peter\@palfrader.org>
+ (c) 2004, 2005 Peter Palfrader <peter\@palfrader.org>
(c) 2004, 2005 Christoph Berg <cb\@df7cb.de>
EOF
}
(c) 2004, 2005 Christoph Berg <cb\@df7cb.de>
EOF
}
- version();
- print STDERR <<EOF;
+ my ($fd, $error) = @_;
+
+ version($fd);
+ print $fd <<EOF;
Usage: $PROGRAM_NAME [-r] [-t <charset>] <keyid> <keytxt> [<outfile>]
Usage: $PROGRAM_NAME [-r] [-t <charset>] <keyid> <keytxt> [<outfile>]
-f <charset> convert <keytxt> from charset
-t <charset> convert UIDs to charset in output
EOF
-f <charset> convert <keytxt> from charset
-t <charset> convert UIDs to charset in output
EOF
f => \$fromcharset,
t => \$charset,
r => \$recv_keys,
f => \$fromcharset,
t => \$charset,
r => \$recv_keys,
- help => sub { usage(0); },
- version => sub { version(); exit 0;},
-) or usage(1);
+ help => sub { usage(*STDOUT, 0); },
+ version => sub { version(*STDOUT); exit 0;},
+) or usage(*STDERR, 1);
# parse options
my $mykey = uc(shift @ARGV);
# parse options
my $mykey = uc(shift @ARGV);
-my $keytxt = (shift @ARGV) || usage(1);
+my $keytxt = (shift @ARGV) || usage(*STDERR, 1);
my $outfile = (shift @ARGV) || '-';
my @mykeys = split /,/, $mykey;
map { s/^0x//i; } @mykeys;
if (!@mykeys || scalar @ARGV) {
my $outfile = (shift @ARGV) || '-';
my @mykeys = split /,/, $mykey;
map { s/^0x//i; } @mykeys;
if (!@mykeys || scalar @ARGV) {
}
if (!grep { /^([0-9A-F]{16,16}|[0-9A-F]{8,8})$/ } @mykeys) {
print STDERR "Invalid keyid given\n";
}
if (!grep { /^([0-9A-F]{16,16}|[0-9A-F]{8,8})$/ } @mykeys) {
print STDERR "Invalid keyid given\n";
}
-r $keytxt or die ("$keytxt does not exist\n");
}
-r $keytxt or die ("$keytxt does not exist\n");
-B<gpgsigs> [-r] [-f I<charset>] [-t I<charset>] I<keyid> F<keytxt> [F<outfile>]
+B<gpgsigs> [-r] [-f I<charset>] [-t I<charset>] I<keyid>I<[>B<,>I<keyidI<[>B<,>I<...>I<]>>I<]> F<keytxt> [F<outfile>]
=item I<keyid>
Use this keyid (8 or 16 byte) for annotation. Multiple keyids can be separated
=item I<keyid>
Use this keyid (8 or 16 byte) for annotation. Multiple keyids can be separated
(c) 2004 Uli Martens <uli@youam.net>
(c) 2004 Uli Martens <uli@youam.net>
-(c) 2004 Peter Palfrader <peter@palfrader.org>
+(c) 2004, 2005 Peter Palfrader <peter@palfrader.org>
(c) 2004, 2005 Christoph Berg <cb@df7cb.de>
(c) 2004, 2005 Christoph Berg <cb@df7cb.de>