23 lines
801 B
Diff
23 lines
801 B
Diff
|
https://github.com/gwsw/less/pull/567
|
||
|
From c02f7554a1e5685e4332fb6857e95761953c8db4 Mon Sep 17 00:00:00 2001
|
||
|
From: Mark Nudelman <markn@greenwoodsoftware.com>
|
||
|
Date: Mon, 9 Sep 2024 14:48:10 -0700
|
||
|
Subject: [PATCH] Allow SOURCE_DATE_EPOCH to override timestamps in generated
|
||
|
files.
|
||
|
|
||
|
Related to #567.
|
||
|
|
||
|
diff --git a/mkhelp.pl b/mkhelp.pl
|
||
|
index e93535b..452d9a0 100755
|
||
|
--- a/mkhelp.pl
|
||
|
+++ b/mkhelp.pl
|
||
|
@@ -7,7 +7,7 @@ use strict;
|
||
|
# whose content is the input to this script.
|
||
|
|
||
|
{
|
||
|
- my ($sec,$min,$hour,$mday,$mon,$year) = gmtime();
|
||
|
+ my ($sec,$min,$hour,$mday,$mon,$year) = gmtime($ENV{SOURCE_DATE_EPOCH} // time());
|
||
|
printf "/* This file was generated by mkhelp.pl from less.hlp at %d:%02d on %d/%d/%d */\n",
|
||
|
$hour, $min, $year+1900, $mon+1, $mday;
|
||
|
print "#include \"less.h\"\n";
|