]> Sergey Matveev's repositories - public-inbox.git/blobdiff - Documentation/txt2pre
build: support doc generation w/o GNU make
[public-inbox.git] / Documentation / txt2pre
index 6f2a8c8ae2707b73aa6fe47314de2a425e7b3eab..7cab0fa259ead40462c19599a6404ee5b3ed0463 100755 (executable)
@@ -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);
+}