about summary refs log tree commit homepage
path: root/Documentation/txt2pre
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-12-01 10:50:19 +0000
committerEric Wong <e@80x24.org>2019-12-11 08:11:36 +0000
commit73fe3421f1ecbdc83600d5acfc643c33dbb9a0f2 (patch)
tree0d302ab79723662ef05a6718570c43f28328702d /Documentation/txt2pre
parent08f57606beaa3772aefd7ebde43e615781976678 (diff)
downloadpublic-inbox-73fe3421f1ecbdc83600d5acfc643c33dbb9a0f2.tar.gz
We can replace the GNU-isms for building docs with Perl5
equivalents.  The only downside is the resulting Makefile
gets larger, but that's the price of portability.
Diffstat (limited to 'Documentation/txt2pre')
-rwxr-xr-xDocumentation/txt2pre6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/txt2pre b/Documentation/txt2pre
index 6f2a8c8a..7cab0fa2 100755
--- a/Documentation/txt2pre
+++ b/Documentation/txt2pre
@@ -22,3 +22,9 @@ print '<html><head>',
   qq(<meta\nhttp-equiv="Content-Type"\ncontent="text/html; charset=utf-8"\n/>),
   "<title>$title</title>",
   "</head><body><pre>",  $str , '</pre></body></html>';
+
+# keep mtime on website consistent so clients can cache
+if (-f STDIN && -f STDOUT) {
+        my @st = stat(STDIN);
+        utime($st[8], $st[9], \*STDOUT);
+}