Generate copyright year properly

Output copyright year depends on any input file(s) and the script.
This is not perfect, but better than what we had.
Also run 'make update'

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5350)
This commit is contained in:
Rich Salz 2018-02-13 13:09:02 -05:00
parent d7c402c4f2
commit 97d37b85d4
13 changed files with 43 additions and 14 deletions

View file

@ -8,6 +8,11 @@
my $obj_dat_h = $ARGV[0];
# Output year depends on the date on the input file and the script.
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
my $iYEAR = [localtime([stat($obj_dat_h)]->[9])]->[5] + 1900;
$YEAR = $iYEAR if $iYEAR > $YEAR;
open IN, '<', $obj_dat_h
|| die "Couldn't open $obj_dat_h : $!\n";