summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/l3build/l3build-install.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-27 22:05:41 +0000
committerKarl Berry <karl@freefriends.org>2019-11-27 22:05:41 +0000
commita249bad88a4acd5b5d3112eeed746258c9dce28d (patch)
tree81909999d28ba1b3f9bf12686e4646951f2ef100 /Master/texmf-dist/scripts/l3build/l3build-install.lua
parentdaa48402af9dca7dd8362ec74380bbd72623fa46 (diff)
l3build (27nov19)
git-svn-id: svn://tug.org/texlive/trunk@52948 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/l3build/l3build-install.lua')
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-install.lua16
1 files changed, 11 insertions, 5 deletions
diff --git a/Master/texmf-dist/scripts/l3build/l3build-install.lua b/Master/texmf-dist/scripts/l3build/l3build-install.lua
index 77338b67a06..1007d2ed1b4 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-install.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-install.lua
@@ -105,6 +105,10 @@ function uninstall()
end
function install_files(target,full,dry_run)
+
+ -- Needed so paths are only cleaned out once
+ local cleanpaths = { }
+
local function install_files(source,dir,files,subdir)
subdir = subdir or moduledir
-- For material associated with secondary tools (BibTeX, MakeIndex)
@@ -155,8 +159,12 @@ function install_files(target,full,dry_run)
if next(filenames) then
if not dry_run then
for _,path in pairs(paths) do
- errorlevel = cleandir(target .. "/" .. path)
- if errorlevel ~= 0 then return errorlevel end
+ local dir = target .. "/" .. path
+ if not cleanpaths[dir] then
+ errorlevel = cleandir(dir)
+ if errorlevel ~= 0 then return errorlevel end
+ end
+ cleanpaths[dir] = true
end
end
for _,file in ipairs(filenames) do
@@ -164,9 +172,7 @@ function install_files(target,full,dry_run)
print("- " .. file)
else
local path,file = splitpath(file)
- local installpath = target .. "/" .. path
- mkdir(installpath)
- errorlevel = cp(file,sourcepaths[file],installpath)
+ errorlevel = cp(file,sourcepaths[file],target .. "/" .. path)
if errorlevel ~= 0 then return errorlevel end
end
end