From 4ba731dd6ff370a42984b4df050906fd9a884bc8 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 14 Aug 2020 20:42:33 +0200 Subject: 2020-08-14 18:56:00 --- scripts/context/lua/mtx-context.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua index 54bdd9e92..223da8193 100644 --- a/scripts/context/lua/mtx-context.lua +++ b/scripts/context/lua/mtx-context.lua @@ -1359,6 +1359,8 @@ end -- touching files (signals regeneration of formats) +local newversion = false + local function touch(path,name,versionpattern,kind,kindpattern) if path and path ~= "" then name = filejoinname(path,name) @@ -1367,9 +1369,11 @@ local function touch(path,name,versionpattern,kind,kindpattern) end local olddata = io.loaddata(name) if olddata then - local oldkind, newkind = "", kind or "" - local oldversion, newversion = "", os.date("%Y.%m.%d %H:%M") + local oldkind = "" + local newkind = kind or "" + local oldversion = "" local newdata + newversion = newversion or os.date("%Y.%m.%d %H:%M") if versionpattern then newdata = gsub(olddata,versionpattern,function(pre,mid,post) oldversion = mid -- cgit v1.2.3