summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-context.lua12
-rw-r--r--scripts/context/lua/mtxrun.lua28
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua28
-rw-r--r--scripts/context/stubs/unix/mtxrun28
-rw-r--r--scripts/context/stubs/win64/mtxrun.lua28
5 files changed, 95 insertions, 29 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 83030e2e7..caf7e2f2a 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -285,11 +285,13 @@ local function multipass_copyluafile(jobname,run)
local tuaname, tucname = jobname..".tua", jobname..".tuc"
if validfile(tuaname) then
if run then
- for i=1,10 do
- local tmpname = format("%s-tuc-%02d.tmp",jobname,i)
- if validfile(tmpname) then
- removefile(tmpname)
- report("removing %a",tmpname)
+ if run == 1 then
+ for i=1,10 do
+ local tmpname = format("%s-tuc-%02d.tmp",jobname,i)
+ if validfile(tmpname) then
+ removefile(tmpname)
+ report("removing %a",tmpname)
+ end
end
end
if validfile(tucname) then
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 89137f3fc..a9e563117 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -3103,7 +3103,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-file"] = package.loaded["l-file"] or true
--- original size: 18308, stripped down to: 9948
+-- original size: 18672, stripped down to: 10256
if not modules then modules={} end modules ['l-file']={
version=1.001,
@@ -3436,6 +3436,18 @@ function file.collapsepath(str,anchor)
end
end
end
+local tricky=S("/\\")*P(-1)
+local attributes=lfs.attributes
+function lfs.isdir(name)
+ if lpegmatch(tricky,name) then
+ return attributes(name,"mode")=="directory"
+ else
+ return attributes(name.."/.","mode")=="directory"
+ end
+end
+function lfs.isfile(name)
+ return attributes(name,"mode")=="file"
+end
local validchars=R("az","09","AZ","--","..")
local pattern_a=lpeg.replacer(1-validchars)
local pattern_a=Cs((validchars+P(1)/"-")^1)
@@ -3841,7 +3853,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-dir"] = package.loaded["l-dir"] or true
--- original size: 16056, stripped down to: 10707
+-- original size: 16182, stripped down to: 10810
if not modules then modules={} end modules ['l-dir']={
version=1.001,
@@ -3867,9 +3879,13 @@ local chdir=lfs.chdir
local mkdir=lfs.mkdir
local onwindows=os.type=="windows" or find(os.getenv("PATH"),";",1,true)
if onwindows then
+ local tricky=S("/\\")*P(-1)
isdir=function(name)
- name=gsub(name,"([/\\]+)$","/.")
- return attributes(name,"mode")=="directory"
+ if lpegmatch(tricky,name) then
+ return attributes(name,"mode")=="directory"
+ else
+ return attributes(name.."/.","mode")=="directory"
+ end
end
isfile=function(name)
return attributes(name,"mode")=="file"
@@ -17287,8 +17303,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 712300
--- stripped bytes : 253386
+-- original bytes : 712790
+-- stripped bytes : 253465
-- end library merge
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 89137f3fc..a9e563117 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -3103,7 +3103,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-file"] = package.loaded["l-file"] or true
--- original size: 18308, stripped down to: 9948
+-- original size: 18672, stripped down to: 10256
if not modules then modules={} end modules ['l-file']={
version=1.001,
@@ -3436,6 +3436,18 @@ function file.collapsepath(str,anchor)
end
end
end
+local tricky=S("/\\")*P(-1)
+local attributes=lfs.attributes
+function lfs.isdir(name)
+ if lpegmatch(tricky,name) then
+ return attributes(name,"mode")=="directory"
+ else
+ return attributes(name.."/.","mode")=="directory"
+ end
+end
+function lfs.isfile(name)
+ return attributes(name,"mode")=="file"
+end
local validchars=R("az","09","AZ","--","..")
local pattern_a=lpeg.replacer(1-validchars)
local pattern_a=Cs((validchars+P(1)/"-")^1)
@@ -3841,7 +3853,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-dir"] = package.loaded["l-dir"] or true
--- original size: 16056, stripped down to: 10707
+-- original size: 16182, stripped down to: 10810
if not modules then modules={} end modules ['l-dir']={
version=1.001,
@@ -3867,9 +3879,13 @@ local chdir=lfs.chdir
local mkdir=lfs.mkdir
local onwindows=os.type=="windows" or find(os.getenv("PATH"),";",1,true)
if onwindows then
+ local tricky=S("/\\")*P(-1)
isdir=function(name)
- name=gsub(name,"([/\\]+)$","/.")
- return attributes(name,"mode")=="directory"
+ if lpegmatch(tricky,name) then
+ return attributes(name,"mode")=="directory"
+ else
+ return attributes(name.."/.","mode")=="directory"
+ end
end
isfile=function(name)
return attributes(name,"mode")=="file"
@@ -17287,8 +17303,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 712300
--- stripped bytes : 253386
+-- original bytes : 712790
+-- stripped bytes : 253465
-- end library merge
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 89137f3fc..a9e563117 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -3103,7 +3103,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-file"] = package.loaded["l-file"] or true
--- original size: 18308, stripped down to: 9948
+-- original size: 18672, stripped down to: 10256
if not modules then modules={} end modules ['l-file']={
version=1.001,
@@ -3436,6 +3436,18 @@ function file.collapsepath(str,anchor)
end
end
end
+local tricky=S("/\\")*P(-1)
+local attributes=lfs.attributes
+function lfs.isdir(name)
+ if lpegmatch(tricky,name) then
+ return attributes(name,"mode")=="directory"
+ else
+ return attributes(name.."/.","mode")=="directory"
+ end
+end
+function lfs.isfile(name)
+ return attributes(name,"mode")=="file"
+end
local validchars=R("az","09","AZ","--","..")
local pattern_a=lpeg.replacer(1-validchars)
local pattern_a=Cs((validchars+P(1)/"-")^1)
@@ -3841,7 +3853,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-dir"] = package.loaded["l-dir"] or true
--- original size: 16056, stripped down to: 10707
+-- original size: 16182, stripped down to: 10810
if not modules then modules={} end modules ['l-dir']={
version=1.001,
@@ -3867,9 +3879,13 @@ local chdir=lfs.chdir
local mkdir=lfs.mkdir
local onwindows=os.type=="windows" or find(os.getenv("PATH"),";",1,true)
if onwindows then
+ local tricky=S("/\\")*P(-1)
isdir=function(name)
- name=gsub(name,"([/\\]+)$","/.")
- return attributes(name,"mode")=="directory"
+ if lpegmatch(tricky,name) then
+ return attributes(name,"mode")=="directory"
+ else
+ return attributes(name.."/.","mode")=="directory"
+ end
end
isfile=function(name)
return attributes(name,"mode")=="file"
@@ -17287,8 +17303,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 712300
--- stripped bytes : 253386
+-- original bytes : 712790
+-- stripped bytes : 253465
-- end library merge
diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua
index 89137f3fc..a9e563117 100644
--- a/scripts/context/stubs/win64/mtxrun.lua
+++ b/scripts/context/stubs/win64/mtxrun.lua
@@ -3103,7 +3103,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-file"] = package.loaded["l-file"] or true
--- original size: 18308, stripped down to: 9948
+-- original size: 18672, stripped down to: 10256
if not modules then modules={} end modules ['l-file']={
version=1.001,
@@ -3436,6 +3436,18 @@ function file.collapsepath(str,anchor)
end
end
end
+local tricky=S("/\\")*P(-1)
+local attributes=lfs.attributes
+function lfs.isdir(name)
+ if lpegmatch(tricky,name) then
+ return attributes(name,"mode")=="directory"
+ else
+ return attributes(name.."/.","mode")=="directory"
+ end
+end
+function lfs.isfile(name)
+ return attributes(name,"mode")=="file"
+end
local validchars=R("az","09","AZ","--","..")
local pattern_a=lpeg.replacer(1-validchars)
local pattern_a=Cs((validchars+P(1)/"-")^1)
@@ -3841,7 +3853,7 @@ do -- create closure to overcome 200 locals limit
package.loaded["l-dir"] = package.loaded["l-dir"] or true
--- original size: 16056, stripped down to: 10707
+-- original size: 16182, stripped down to: 10810
if not modules then modules={} end modules ['l-dir']={
version=1.001,
@@ -3867,9 +3879,13 @@ local chdir=lfs.chdir
local mkdir=lfs.mkdir
local onwindows=os.type=="windows" or find(os.getenv("PATH"),";",1,true)
if onwindows then
+ local tricky=S("/\\")*P(-1)
isdir=function(name)
- name=gsub(name,"([/\\]+)$","/.")
- return attributes(name,"mode")=="directory"
+ if lpegmatch(tricky,name) then
+ return attributes(name,"mode")=="directory"
+ else
+ return attributes(name.."/.","mode")=="directory"
+ end
end
isfile=function(name)
return attributes(name,"mode")=="file"
@@ -17287,8 +17303,8 @@ end -- of closure
-- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua
-- skipped libraries : -
--- original bytes : 712300
--- stripped bytes : 253386
+-- original bytes : 712790
+-- stripped bytes : 253465
-- end library merge