From: Jacob Bachmeyer Date: Sun, 19 Mar 2023 03:54:45 +0000 (-0500) Subject: Revise version message in gatekeeper X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8b332fca9e25ca20efadef18f19de8e29c63aa0f;p=gatekeeper.git Revise version message in gatekeeper This brings the output of ./gatekeeper.pl --version in line with current GNU standards and moves the copyright notice to the top of the file so Emacs can easily find it for future updates. --- diff --git a/gatekeeper.pl b/gatekeeper.pl index d6c41ec..34ed24c 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -1,7 +1,24 @@ #!/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 +Copyright (C) 2020-2023 Jacob Bachmeyer +License GPLv3+: GNU GPL version 3 or later +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 @@ -165,10 +182,7 @@ to send email. # 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 @@ -214,17 +228,6 @@ BEGIN { 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 -Copyright (C) 2020-2023 Jacob Bachmeyer -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 = ''; @@ -277,15 +280,11 @@ BEGIN { } 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; }