From da218244191276635983d3cba1a496c1a8c786df Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 1 Nov 2005 08:19:18 +0000 Subject: [PATCH] add start of new gpg_kc command --- gpg_kc | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 gpg_kc diff --git a/gpg_kc b/gpg_kc new file mode 100644 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__ -- 2.39.2