# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+=head1 NAME
+
+gatekeeper - process uploaded files
+
+=head1 SYNOPSIS
+
+gatekeeper.pl -B<s> I<style> [-B<d> I<debuglevel>] [-B<v>] [-B<h>]
+
+gatekeeper.pl --B<style> I<style> [--B<debug> I<debuglevel>]
+
+gatekeeper.pl --B<version>
+
+gatekeeper.pl --B<help>
+
+=head1 OPTIONS
+
+=over
+
+=item B<--help>
+
+Show usage information and exit.
+
+=item B<--version>
+
+Show version information and exit.
+
+=item B<--style>
+
+Specify the style to use. The "style" selects a configuration subset for
+the role the tool should process on this run. Each role is for a different
+collection of files to be managed.
+
+Currently, styles are hardwired in the tool:
+
+=over
+
+=item ftp
+
+Used for ftp.gnu.org.
+
+=item alpha
+
+Used for alpha.gnu.org.
+
+=item distros
+
+Used for system distributions hosted or mirrored on ftp.gnu.org.
+
+=back
+
+=back
+
+=head1 DESCRIPTION
+
+...
+
+=cut
+
+
#
# Short overview
#
use FindBin;
use File::Spec;
+use Pod::Usage;
use Net::SMTP;
use Date::Manip;
our $help;
our $version;
-sub usage_information {
- print "ERROR: You have not supplied all required parameters.\n\n"
- unless $_[0];
- print "$NAME protocol v$VERSION ($DATE)\nMore information at $URL\n";
- print <<"END";
-
- $NAME -s <style> [-d <debuglevel>] [-v] [-h]\n
- <style> is the execution 'style'. Call $NAME
- without the -s parameter to get a list of possible styles.
- -d <debuglevel> (optional) set debug level. 0 means no debugging
- -v (optional) display version information
- -h (optional) display this help screen\n
-Possible styles:\n
- ftp
- alpha
- distros
-
-END
- exit ((defined $_[0] && $_[0]) ? 0 : 1);
-}
-
sub version_information {
print "\nThis is $NAME protocol version $VERSION ($DATE)\n";
print $COPYRIGHT_NOTICE;
}
version_information() if ($version);
-usage_information(1) if ($help);
-usage_information()
+pod2usage(-verbose => 1, -exitval => 0) if ($help);
+pod2usage(-message => 'ERROR: Required parameter not given or invalid.',
+ -verbose => 0, -exitval => 2)
if (($style ne 'ftp') && ($style ne 'alpha') && ($style ne 'distros'));
my $m_style = 'ftp';
my %info; # package being processed; a global so fatal and mail can use it
+=head1 INTERNALS
+
+This section catches the internal documentation for internal functions
+within the gatekeeper program. This is for programmers maintaining the
+gatekeeper itself and these functions may change without notice.
+
+=over
+
+=cut
+
\f
#
# - Logging
}
}
+=back
+
+=cut
\f
#