about summary refs log tree commit homepage
path: root/Documentation/txt2pre
diff options
context:
space:
mode:
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);
+}