[latex3-commits] [git/LaTeX3-latex3-latex3] main, peek-refactor: Correct handling for fmtname (9c7a47a31)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Jan 10 14:03:27 CET 2022


Repository : https://github.com/latex3/latex3
On branches: main,peek-refactor
Link       : https://github.com/latex3/latex3/commit/9c7a47a31bf9e0d67d5854d003ad8031e5f62c84

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

commit 9c7a47a31bf9e0d67d5854d003ad8031e5f62c84
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Jan 10 13:03:27 2022 +0000

    Correct handling for fmtname


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

9c7a47a31bf9e0d67d5854d003ad8031e5f62c84
 build-config.lua | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/build-config.lua b/build-config.lua
index ccb6b5f9a..acba74478 100644
--- a/build-config.lua
+++ b/build-config.lua
@@ -120,11 +120,19 @@ local function fmt(engines,dest)
       return errorlevel
     end
 
-    local engname = string.match(src,"^[^.]*") .. ".fmt"
-    local fmtname = string.gsub(engine,"tex$","") .. "latex.fmt"
-    if engname ~= fmtname then
-      ren(unpackdir,engname,fmtname)
+    local fmtname = jobname(src) .. ".fmt"
+    local newname
+    if specialformats.latex[engine] and specialformats.latex[engine].format then
+      newname = specialformats.latex[engine].format .. ".fmt"
+    else
+      newname = string.gsub(engine,"tex$","latex.fmt")
+    end
+    if fmtname ~= newname then
+      print(fmtname,newname)
+      ren(unpackdir,fmtname,newname)
+      fmtname = newname
     end
+
     cp(fmtname,unpackdir,dest)
 
     return 0





More information about the latex3-commits mailing list.