]> git.donarmstrong.com Git - bin.git/commitdiff
add start of new gpg_kc command
authorDon Armstrong <don@donarmstrong.com>
Tue, 1 Nov 2005 08:19:18 +0000 (08:19 +0000)
committerDon Armstrong <don@donarmstrong.com>
Tue, 1 Nov 2005 08:19:18 +0000 (08:19 +0000)
gpg_kc [new file with mode: 0644]

diff --git a/gpg_kc b/gpg_kc
new file mode 100644 (file)
index 0000000..f52f5e0
--- /dev/null
+++ b/gpg_kc
@@ -0,0 +1,79 @@
+#! /usr/bin/perl
+
+use warnings;
+use strict;
+
+use Getopt::Long;
+use Pod::Usage;
+
+=head1 NAME
+
+gpg_kc -- gpg keychain management
+
+=head1 SYNOPSIS
+
+gpg_kc [retrieve|update|sync]
+
+ Options:
+  --debug, -d debugging level (Default 0)
+  --help, -h display this help
+  --man, -m display manual
+
+
+=head1 COMMANDS
+
+=over
+
+=item retrieve -- retrieve keys in the keylist from a keyserver
+
+=item update -- update keys in the keyring and add new keys in the keylist
+
+=item sync -- add new keys in the keyring to the keylist and vice versa
+
+=back
+
+=head1 OPTIONS
+
+=over
+
+=item B<--debug, -d>
+
+Debug verbosity. (Default 0)
+
+=item B<--help, -h>
+
+Display brief useage information.
+
+=item B<--man, -m>
+
+Display this manual.
+
+=back
+
+=head1 EXAMPLES
+
+=cut
+
+
+#gpg --list-public-keys --with-colons |perl -ne 'next unless /^pub/; @fields = split /:/; print $fields[4],qq(\n);' > keylist
+
+
+use vars qw($DEBUG);
+
+# XXX parse config file
+
+my %options = (debug           => 0,
+              help            => 0,
+              man             => 0,
+             );
+
+GetOptions(\%options,'debug|d+','help|h|?','man|m');
+
+pod2usage() if $options{help};
+pod2usage({verbose=>2}) if $options{man};
+
+$DEBUG = $options{debug};
+
+
+
+__END__