diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-12 23:01:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-12 23:01:17 +0000 |
commit | 879e67d4e530cd1a38e1a80a4f779dacd44636dc (patch) | |
tree | 00d16b7e64cd3717ad4e16a024e00b47cc549496 /Master/texmf-dist/scripts/context/lua/mtx-context.lua | |
parent | 512547ff22232693018f59e34d48351f031c4c33 (diff) |
context (size 11122862, Apr 11 19:56)
git-svn-id: svn://tug.org/texlive/trunk@29878 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/context/lua/mtx-context.lua')
-rw-r--r-- | Master/texmf-dist/scripts/context/lua/mtx-context.lua | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-context.lua b/Master/texmf-dist/scripts/context/lua/mtx-context.lua index add21fc90ff..fd4fe8af3d4 100644 --- a/Master/texmf-dist/scripts/context/lua/mtx-context.lua +++ b/Master/texmf-dist/scripts/context/lua/mtx-context.lua @@ -1023,8 +1023,13 @@ end -- touching files (signals regeneration of formats) -local function touch(name,versionpattern,kind,kindpattern) - local name = resolvers.findfile(name) +local function touch(path,name,versionpattern,kind,kindpattern) + if path and path ~= "" then + name = file.join(path,name) +print(name) + else + name = resolvers.findfile(name) + end local olddata = io.loaddata(name) if olddata then local oldkind, newkind = "", kind or "" @@ -1056,16 +1061,18 @@ local p_contextkind = "(\\edef\\contextkind%s*{)(.-)(})" local p_contextversion = "(\\edef\\contextversion%s*{)(.-)(})" local p_newcontextversion = "(\\newcontextversion%s*{)(.-)(})" -local function touchfiles(suffix,kind) - local foundname, oldversion, newversion, oldkind, newkind = touch(file.addsuffix("context",suffix),p_contextversion,kind,p_contextkind) +local function touchfiles(suffix,kind,path) + local foundname, oldversion, newversion, oldkind, newkind = touch(path,file.addsuffix("context",suffix),p_contextversion,kind,p_contextkind) if foundname then report("old version : %s (%s)",oldversion,oldkind) report("new version : %s (%s)",newversion,newkind) report("touched file : %s",foundname) - local foundname = touch(file.addsuffix("cont-new",suffix),p_newcontextversion) + local foundname = touch(path,file.addsuffix("cont-new",suffix),p_newcontextversion) if foundname then report("touched file : %s", foundname) end + else + report("nothing touched") end end @@ -1073,12 +1080,13 @@ function scripts.context.touch() if getargument("expert") then local touch = getargument("touch") local kind = getargument("kind") + local path = getargument("basepath") if touch == "mkii" or touch == "mkiv" or touch == "mkvi" then -- mkix mkxi - touchfiles(touch,kind) + touchfiles(touch,kind,path) else - touchfiles("mkii",kind) - touchfiles("mkiv",kind) - touchfiles("mkvi",kind) + touchfiles("mkii",kind,path) + touchfiles("mkiv",kind,path) + touchfiles("mkvi",kind,path) end else report("touching needs --expert") |