[latex3-commits] [git/LaTeX3-latex3-l3build] main: Copy tdsdir files for CTAN target (3156f7e)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Dec 9 10:40:08 CET 2021


Repository : https://github.com/latex3/l3build
On branch  : main
Link       : https://github.com/latex3/l3build/commit/3156f7e3599cee209ab10d882fae34bbe70b8de7

>---------------------------------------------------------------

commit 3156f7e3599cee209ab10d882fae34bbe70b8de7
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Dec 8 17:37:56 2021 +0000

    Copy tdsdir files for CTAN target


>---------------------------------------------------------------

3156f7e3599cee209ab10d882fae34bbe70b8de7
 l3build-ctan.lua | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/l3build-ctan.lua b/l3build-ctan.lua
index 1f5aa2b..e35d4a6 100644
--- a/l3build-ctan.lua
+++ b/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)





More information about the latex3-commits mailing list.