[latex3-commits] [git/LaTeX3-latex3-l3build] TDS: Order tdslocations (e8de804)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Jul 26 22:22:23 CEST 2019


Repository : https://github.com/latex3/l3build
On branch  : TDS
Link       : https://github.com/latex3/l3build/commit/e8de804234f1ff1431fd0e5136e2cca188f97e4c

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

commit e8de804234f1ff1431fd0e5136e2cca188f97e4c
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Jul 26 21:22:23 2019 +0100

    Order tdslocations


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

e8de804234f1ff1431fd0e5136e2cca188f97e4c
 l3build-install.lua | 15 +++++----------
 l3build.dtx         |  3 +++
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/l3build-install.lua b/l3build-install.lua
index ced022a..66b1ae6 100644
--- a/l3build-install.lua
+++ b/l3build-install.lua
@@ -22,8 +22,9 @@ for those people who are interested.
 
 --]]
 
-local pairs = pairs
-local print = print
+local ipairs = ipairs
+local pairs  = pairs
+local print  = print
 
 local set_program = kpse.set_program_name
 local var_value   = kpse.var_value
@@ -93,13 +94,6 @@ function uninstall()
 end
 
 function install_files(target,full,dry_run)
-  -- Create a map for non-standard installation locations
-  local tdsmap = { }
-  for _,location in pairs(tdslocations) do
-    path,glob = splitpath(location)
-    tdsmap[glob] = path
-  end
-
   local function install_files(source,dir,files,subdir)
     subdir = subdir or moduledir
     -- For material associated with secondary tools (BibTeX, MakeIndex)
@@ -118,7 +112,8 @@ function install_files(target,full,dry_run)
           -- Just want the name
           local file = gsub(file,"^%./","")
           local matched = false
-          for glob,path in pairs(tdsmap) do
+          for _,location in ipairs(tdslocations) do
+            local path,glob = splitpath(location)
             local pattern = glob_to_pattern(glob)
             if match(file,pattern) then
               insert(paths,path)
diff --git a/l3build.dtx b/l3build.dtx
index fe0e573..c7220ee 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -1254,6 +1254,9 @@
 %   \label{fig:tds}
 % \end{figure}
 %
+% The table is read in order, and thus specific file names should come before
+% potential wild-card matches.
+%
 % \subsection{Automatic tagging}
 % \label{sec:tagging}
 %





More information about the latex3-commits mailing list