cabot ca-dosign
Joost van Baal
joostvb-savannah@mdcc.cx
Sat, 26 Jul 2003 06:41:19 -0400
CVSROOT: /cvsroot/cabot
Module name: cabot
Branch:
Changes by: Joost van Baal <joostvb-savannah@mdcc.cx> 03/07/26 06:41:19
Modified files:
. : ca-dosign
Log message:
more robust config file handling, cosmetics on user messages
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/cabot/cabot/ca-dosign.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
Patches:
Index: cabot/ca-dosign
diff -u cabot/ca-dosign:1.9 cabot/ca-dosign:1.10
--- cabot/ca-dosign:1.9 Sat Jul 26 06:20:30 2003
+++ cabot/ca-dosign Sat Jul 26 06:41:19 2003
@@ -27,9 +27,9 @@
our %CONFIG;
my $config = $ENV{'HOME'} . '/.cabotrc';
-
+-f $config or die "No file $config present. See ca-config(5).\n";
unless (scalar eval `cat $config`) {
- warn "couldn't parse $_: $@" if $@;
+ die "Couldn't parse $_: $@.\n" if $@;
};
# FIXME : should be in to be created Cabot.pm
@@ -42,7 +42,7 @@
return $CONFIG{$what}.'/'.$keyid. ( defined $uid ? '/'.$uid : '' );
}
-my $revision = '$Revision: 1.9 $';
+my $revision = '$Revision: 1.10 $';
sub send_mail($$$) {
my ($to, $subject, $body) = @_;
@@ -182,13 +182,13 @@
system('gpg', '--edit', $keyid, @ARGS, 'sign', 'save', 'quit');
#system("gpg --sign-key $keyid");
- print "Continue: (Y/n) ";
+ print "Continue? [Y/n] ";
my $cont = <stdin>;
exit if ($cont =~ /^n/i);
my $keyservernote;
if ($sendkeyserver) {
- print "User has requested key upload. do so? (Y/n)";
+ print "User has requested key upload. Do so? [Y/n] ";
my $cont = <stdin>;
unless ($cont =~ /^n/i) {
for my $keyserver ( @{$CONFIG{'keyservers'}} ) {
@@ -233,7 +233,7 @@
EOF
};
- print "send mail? (Y/n)";
+ print "Send mail? [Y/n] ";
$cont = <stdin>;
unless ($cont =~ /^n/i) {
my $text = << "EOF";
@@ -347,7 +347,7 @@
=head1 VERSION
-$Id: ca-dosign,v 1.9 2003/07/26 10:20:30 joostvb Exp $
+$Id: ca-dosign,v 1.10 2003/07/26 10:41:19 joostvb Exp $
=head1 COPYRIGHT