[latex3-commits] [git/LaTeX3-latex3-l3build] direct-copy: Copy tdsdir files for CTAN target (8b0f4e6)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Dec 8 18:37:56 CET 2021


Repository : https://github.com/latex3/l3build
On branch  : direct-copy
Link       : https://github.com/latex3/l3build/commit/8b0f4e62c9ceffd3011551e60fbdc7d883b3d4fa

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

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

    Copy tdsdir files for CTAN target


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

8b0f4e62c9ceffd3011551e60fbdc7d883b3d4fa
 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.