diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-08-14 20:42:33 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-08-14 20:42:33 +0200 |
commit | 4ba731dd6ff370a42984b4df050906fd9a884bc8 (patch) | |
tree | 73377741fd16501c9d536f7b03f44e73bbcc5433 /scripts | |
parent | ecd89c90ce23e7f7ffa5c1fb65d84d392fd26f82 (diff) | |
download | context-4ba731dd6ff370a42984b4df050906fd9a884bc8.tar.gz |
2020-08-14 18:56:00
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtx-context.lua | 8 |
1 files changed, 6 insertions, 2 deletions
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 |