summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-05 23:17:08 +0000
committerKarl Berry <karl@freefriends.org>2017-06-05 23:17:08 +0000
commit683004f8a1d94fc432fd8104903a431e27bfba93 (patch)
tree2450b41f4c918810556cbaec853ec48ddc2b949a /Master/texmf-dist/tex/latex/l3build
parentc684ba451bf548bdb24c40ed54caa9f11ac21422 (diff)
latex3 (30may17)
git-svn-id: svn://tug.org/texlive/trunk@44483 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3build')
-rw-r--r--Master/texmf-dist/tex/latex/l3build/l3build.lua48
1 files changed, 24 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/l3build/l3build.lua b/Master/texmf-dist/tex/latex/l3build/l3build.lua
index da1283b6302..44a4783727d 100644
--- a/Master/texmf-dist/tex/latex/l3build/l3build.lua
+++ b/Master/texmf-dist/tex/latex/l3build/l3build.lua
@@ -23,7 +23,7 @@ for those people who are interested.
--]]
-- Version information
-release_date = "2017/05/19"
+release_date = "2017/05/29"
-- "module" is a deprecated function in Lua 5.2: as we want the name
-- for other purposes, and it should eventually be 'free', simply
@@ -468,6 +468,15 @@ if os_type == "windows" then
os_yes = "for /l %I in (1,1,200) do @echo y"
end
+-- Return an absolute path from a relative one
+function abspath(path)
+ local oldpwd = lfs.currentdir()
+ lfs.chdir(path)
+ local result = lfs.currentdir()
+ lfs.chdir(oldpwd)
+ return gsub(result, "\\", "/")
+end
+
-- For cleaning out a directory, which also ensures that it exists
function cleandir(dir)
local errorlevel = mkdir(dir)
@@ -566,15 +575,6 @@ function mkdir(dir)
end
end
--- Return an absolute path from a relative one
-function abspath(path)
- local oldpwd = lfs.currentdir()
- lfs.chdir(path)
- local result = lfs.currentdir()
- lfs.chdir(oldpwd)
- return result
-end
-
-- Rename
function ren(dir, source, dest)
local dir = dir .. "/"
@@ -1352,7 +1352,7 @@ function runtest(name, engine, hide, ext, makepdf)
.. checkopts .. " " .. asciiopt .. lvtfile
.. (hide and (" > " .. os_null) or "")
.. os_concat ..
- runtest_tasks(stripext(lvtfile))
+ runtest_tasks(jobname(lvtfile))
)
end
if makepdf and fileexists(testdir .. "/" .. name .. dviext) then
@@ -1402,18 +1402,18 @@ function dvitopdf(name, dir, engine, hide)
end
end
--- Strip the extension from a file name (if present)
-function stripext(file)
- local name = match(file, "^(.*)%.")
- return name or file
-end
-
-- Strip the path from a file name (if present)
function basename(file)
local name = match(file, "^.*/([^/]*)$")
return name or file
end
+-- Strip the extension from a file name (if present)
+function jobname(file)
+ local name = match(basename(file), "^(.*)%.")
+ return name or file
+end
+
-- Look for a test: could be in the testfiledir or the unpackdir
function testexists(test)
return(locate({testfiledir, unpackdir}, {test .. lvtext}))
@@ -1506,7 +1506,7 @@ function tex(file)
end
function typesetpdf(file)
- local name = stripext(basename(file))
+ local name = jobname(file)
print("Typesetting " .. name)
local errorlevel = typeset(file)
if errorlevel == 0 then
@@ -1523,7 +1523,7 @@ typeset = typeset or function(file)
if errorlevel ~= 0 then
return errorlevel
else
- local name = stripext(basename(file))
+ local name = jobname(file)
errorlevel = biber(name) + bibtex(name)
if errorlevel == 0 then
local function cycle(name)
@@ -1590,14 +1590,14 @@ function check(names)
-- No names passed: find all test files
if not next(names) then
for _,i in pairs(filelist(testfiledir, "*" .. lvtext)) do
- insert(names, stripext(i))
+ insert(names, jobname(i))
end
for _,i in ipairs(filelist(unpackdir, "*" .. lvtext)) do
if fileexists(testfiledir .. "/" .. i) then
print("Duplicate test file: " .. i)
return 1
else
- insert(names, stripext(i))
+ insert(names, jobname(i))
end
end
end
@@ -1701,7 +1701,7 @@ function cmdcheck()
print("Checking source files")
for _,i in ipairs(cmdchkfiles) do
for _,j in ipairs(filelist(".", i)) do
- print(" " .. stripext(j))
+ print(" " .. jobname(j))
run(
testdir,
os_setenv .. " TEXINPUTS=." .. os_pathsep .. localdir
@@ -1711,7 +1711,7 @@ function cmdcheck()
" \"\\PassOptionsToClass{check}{l3doc} \\input " .. j .. "\""
.. " > " .. os_null
)
- for line in lines(testdir .. "/" .. stripext(j) .. ".cmds") do
+ for line in lines(testdir .. "/" .. jobname(j) .. ".cmds") do
if match(line, "^%!") then
print(" - " .. match(line, "^%! (.*)"))
end
@@ -1870,7 +1870,7 @@ function doc(files)
if files and next(files) then
typeset = false
for _,k in ipairs(files) do
- if k == stripext(j) then
+ if k == jobname(j) then
typeset = true
break
end