summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/l3build/l3build-ctan.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-09 21:05:14 +0000
committerKarl Berry <karl@freefriends.org>2021-12-09 21:05:14 +0000
commitd591e5abd44a7f052daf9e40281051f5aeeb2c02 (patch)
tree92674fe1a6f9c080c15b6d5fda2b77e8019bbdc3 /Master/texmf-dist/scripts/l3build/l3build-ctan.lua
parentaaf82f524c0dfe58de47f941d55875e5a7a3e8da (diff)
l3build (9dec21)
git-svn-id: svn://tug.org/texlive/trunk@61260 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/l3build/l3build-ctan.lua')
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-ctan.lua20
1 files changed, 16 insertions, 4 deletions
diff --git a/Master/texmf-dist/scripts/l3build/l3build-ctan.lua b/Master/texmf-dist/scripts/l3build/l3build-ctan.lua
index 1f5aa2bc906..2efdd14067d 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-ctan.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-ctan.lua
@@ -33,17 +33,28 @@ local newzip = require"l3build-zip"
-- Copy files to the main CTAN release directory
function copyctan()
- mkdir(ctandir .. "/" .. ctanpkg)
+ local pkgdir = ctandir .. "/" .. ctanpkg
+ mkdir(pkgdir)
+
+ -- Handle pre-formed sources: do two passes to avoid any cleandir() issues
+ for _,dest in pairs(tdsdirs) do
+ mkdir(pkgdir .. "/" .. dest)
+ end
+ for src,dest in pairs(tdsdirs) do
+ cp("*",src,pkgdir .. "/" .. dest)
+ end
+
+ -- Now deal with the one-at-a-time files
local function copyfiles(files,source)
if source == currentdir or flatten then
for _,filetype in pairs(files) do
- cp(filetype,source,ctandir .. "/" .. ctanpkg)
+ cp(filetype,source,pkgdir)
end
else
for _,filetype in pairs(files) do
for _,p in ipairs(tree(source,filetype)) do
local path = dirname(p.src)
- local ctantarget = ctandir .. "/" .. ctanpkg .. "/"
+ local ctantarget = pkgdir .. "/"
.. source .. "/" .. path
mkdir(ctantarget)
cp(p.src,source,ctantarget)
@@ -57,8 +68,9 @@ function copyctan()
end
copyfiles(sourcefiles,sourcefiledir)
for _,file in pairs(textfiles) do
- cp(file, textfiledir, ctandir .. "/" .. ctanpkg)
+ cp(file, textfiledir, pkgdir)
end
+
end
function bundlectan()