#! /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__