summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/l3build
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/l3build')
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-install.lua21
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-variables.lua3
-rwxr-xr-xMaster/texmf-dist/scripts/l3build/l3build.lua2
3 files changed, 20 insertions, 6 deletions
diff --git a/Master/texmf-dist/scripts/l3build/l3build-install.lua b/Master/texmf-dist/scripts/l3build/l3build-install.lua
index d2222c8561e..77338b67a06 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-install.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-install.lua
@@ -115,27 +115,36 @@ function install_files(target,full,dry_run)
end
dir = dir .. (subdir and ("/" .. subdir) or "")
local filenames = { }
+ local sourcepaths = { }
local paths = { }
-- Generate a file list and include the directory
for _,glob_table in pairs(files) do
for _,glob in pairs(glob_table) do
for file,_ in pairs(tree(source,glob)) do
-- Just want the name
- local file = gsub(file,"^%./","")
+ local path,filename = splitpath(file)
+ local sourcepath = "/"
+ if path == "." then
+ sourcepaths[filename] = source
+ else
+ path = gsub(path,"^%.","")
+ sourcepaths[filename] = source .. path
+ if not flattentds then sourcepath = path .. "/" end
+ end
local matched = false
for _,location in ipairs(tdslocations) do
local path,glob = splitpath(location)
local pattern = glob_to_pattern(glob)
- if match(file,pattern) then
+ if match(filename,pattern) then
insert(paths,path)
- insert(filenames,path .. "/" .. file)
+ insert(filenames,path .. sourcepath .. filename)
matched = true
break
end
end
if not matched then
insert(paths,dir)
- insert(filenames,dir .. "/" .. file)
+ insert(filenames,dir .. sourcepath .. filename)
end
end
end
@@ -155,7 +164,9 @@ function install_files(target,full,dry_run)
print("- " .. file)
else
local path,file = splitpath(file)
- errorlevel = cp(file,source,target .. "/" .. path)
+ local installpath = target .. "/" .. path
+ mkdir(installpath)
+ errorlevel = cp(file,sourcepaths[file],installpath)
if errorlevel ~= 0 then return errorlevel end
end
end
diff --git a/Master/texmf-dist/scripts/l3build/l3build-variables.lua b/Master/texmf-dist/scripts/l3build/l3build-variables.lua
index 11186c0e3f9..06cfdd34aff 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-variables.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-variables.lua
@@ -177,6 +177,9 @@ epoch = epoch or 1463734800
if flatten == nil then
flatten = true
end
+if flattentds == nil then
+ flattentds = true
+end
maxprintline = maxprintline or 79
packtdszip = packtdszip or false
typesetcmds = typesetcmds or ""
diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua
index 1696ef18721..7f0f9dced92 100755
--- a/Master/texmf-dist/scripts/l3build/l3build.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build.lua
@@ -25,7 +25,7 @@ for those people who are interested.
--]]
-- Version information
-release_date = "2019-09-29"
+release_date = "2019-09-30"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")