File: 0004-make-system-date-override-able-via-date.patch

package info (click to toggle)
lua-ldoc 1.4.3-5%2Bnmu1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 912 kB
  • ctags: 748
  • sloc: ansic: 56; makefile: 55
file content (32 lines) | stat: -rw-r--r-- 1,081 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Enrico Tassi <gareuselesinge@debian.org>
Date: Tue, 18 Aug 2015 11:18:01 +0200
Subject: make system date override-able via --date

---
 ldoc.lua | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ldoc.lua b/ldoc.lua
index ccdb65e..528c42c 100644
--- a/ldoc.lua
+++ b/ldoc.lua
@@ -62,6 +62,7 @@ ldoc, a documentation generator for Lua, vs 1.4.3
   -M,--merge allow module merging
   -S,--simple no return or params, no summary
   -O,--one one-column output layout
+  --date  (default system) use this date in generated doc
   --dump                debug output dump
   --filter (default none) filter output as Lua data (e.g pl.pretty.dump)
   --tags (default none) show all references to given tags, comma-separated
@@ -782,7 +783,11 @@ ldoc.modules = module_list
 ldoc.title = ldoc.title or args.title
 ldoc.project = ldoc.project or args.project
 ldoc.package = args.package:match '%a+' and args.package or nil
+if args.date == 'system' then
 ldoc.updatetime = os.date("%Y-%m-%d %H:%M:%S")
+else
+ldoc.updatetime = args.date
+end
 
 local html = require 'ldoc.html'