summaryrefslogtreecommitdiff
path: root/fuzz/mkfuzzoids.pl
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2018-02-13 13:09:02 -0500
committerRich Salz <rsalz@openssl.org>2018-02-13 13:22:30 -0500
commit97d37b85d4e1a218fdc61dbe0dff3e7c8ff36121 (patch)
treeb7af9616b57456e5606683507bab2d81e44aa1f6 /fuzz/mkfuzzoids.pl
parentd7c402c4f2d9c311a91616fd75c24a15afabe2e5 (diff)
downloadopenssl-new-97d37b85d4e1a218fdc61dbe0dff3e7c8ff36121.tar.gz
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)
Diffstat (limited to 'fuzz/mkfuzzoids.pl')
-rwxr-xr-xfuzz/mkfuzzoids.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/fuzz/mkfuzzoids.pl b/fuzz/mkfuzzoids.pl
index 4bf97bc152..9ad96b349a 100755
--- a/fuzz/mkfuzzoids.pl
+++ b/fuzz/mkfuzzoids.pl
@@ -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";