#!/usr/bin/perl -Tw
-# This program is free software;
-# see the "LICENSE" POD section at the end for the full details.
+use strict;
+use warnings;
+
+use constant VERSION_MESSAGE => <<'EOM';
+GNU Secure Software Gatekeeper 0.9-pre
+Copyright (C) 2003-2017 Free Software Foundation <sysadmin@gnu.org>
+Copyright (C) 2020-2023 Jacob Bachmeyer <jcb@gnu.org>
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+See the LICENSE section in the embedded documentation for the full boilerplate.
+See the AUTHORS section in the embedded documentation for authorship details.
+
+Protocol versions supported: 1.1 - 1.2
+
+More information at:
+ http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html
+
+EOM
=head1 NAME
# SHELL=/bin/bash
# * * * * * gatekpr /home/gatekpr/upload-ftp.pl -s ftp; /home/gatekpr/upload-alpha.pl -s alpha; /home/gatekpr/upload-distros.pl -s distros
-use strict;
-use warnings;
-
-use constant (); # load this now for use in later BEGIN blocks
+use constant (); # ensure this is loaded for use in later BEGIN blocks
use Carp qw(cluck); # for stack trace on error in ftp_syslog
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
}
-my $NAME = 'gatekeeper.pl';
-my $VERSION = '1.2'; # This is the protocol version
-my $DATE = '2017/09/14 12:42:38';
-my $COPYRIGHT_NOTICE = <<'END';
-Copyright (C) 2003-2017 Free Software Foundation <sysadmin@gnu.org>
-Copyright (C) 2020-2023 Jacob Bachmeyer <jcb@gnu.org>
-END
-my $LICENSE = "GPLv3 or later - http://www.fsf.org/licenses/gpl.txt";
-my $URL =
- "http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html";
-
BEGIN {
my $ZONE = '';
my $want_help = '';
}
if (WANT_VERSION) {
- print "\nThis is $NAME protocol version $VERSION ($DATE)\n";
- print $COPYRIGHT_NOTICE;
- print "License: $LICENSE\n";
- print "More information at $URL\n\n";
- print 'Running in ', (IN_TEST_MODE ? 'testing' : 'production'),
- " mode with PATH:\n ", $ENV{PATH}, "\n\n";
- print 'Running with @INC:', "\n";
- print " $_\n" for @INC;
- print "\n";
+ my $message = VERSION_MESSAGE;
+ # per standards.texi, "Standards for Command-Line Interfaces", "--version",
+ # prune all copyright notices to display only the last year
+ $message =~ s/(\(C\))[^[:alpha:]]*[^[:digit:]]([[:digit:]]+\s)/$1 $2/g;
+ print $message;
exit 0;
}