[latex3-commits] [l3svn] 01/02: Use new call() function for build.lua

noreply at latex-project.org noreply at latex-project.org
Tue Jul 4 14:42:21 CEST 2017


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

commit 491f2ea2742d32e000ed97f00a40c458ace4ac99
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Jul 4 13:41:27 2017 +0100

    Use new call() function for build.lua
---
 build.lua |   46 ++++++----------------------------------------
 1 file changed, 6 insertions(+), 40 deletions(-)

diff --git a/build.lua b/build.lua
index d8c2b4f..982e1e7 100644
--- a/build.lua
+++ b/build.lua
@@ -22,63 +22,29 @@ ctanbundles  = {"l3kernel", "l3packages", "l3experimental"}
 maindir = "."
 
 -- A custom main function
--- While almost all of this is customise, the need to be able to cp and
--- rm files means that loading l3build.lua is very useful
 function main (target)
-  local function dobundles (bundles, target)
-    local errorlevel = 0
-    for _,i in ipairs (bundles) do
-      local date = ""
-      if options.date then
-        date = " --date=" .. options.date[1]
-      end
-      local engines = ""
-      if options.engines then
-        options.engines = " --engine=" .. table.concat(options.engines, ",")
-      end
-      local release = ""
-      if options.release then
-        release = " --release=" .. options.release[1]
-      end
-      errorlevel = run(
-        i,
-        "texlua " .. scriptname .. " "
-          .. target
-          .. (options.halt and " -H" or "")
-          .. date
-          .. engines
-          .. (options.pdf and " -p" or "")
-          .. (options.quiet and " -q" or "")
-          .. release
-      )
-      if errorlevel ~= 0 then
-        break
-      end
-    end
-    return errorlevel
-  end
   local errorlevel
   if target == "check" then
-    errorlevel = dobundles(checkbundles, "check")
+    errorlevel = call(checkbundles, "check")
   elseif target == "clean" then
     print ("Cleaning up")
     dobundles (bundles, "clean")
     rm (".", "*.zip")
   elseif target == "ctan" then
-    errorlevel = dobundles (ctanbundles, "ctan")
+    errorlevel = call (ctanbundles, "ctan")
     if errorlevel == 0 then
       for _,i in ipairs (ctanbundles) do
         cp (i .. ".zip", i, ".")
       end
     end
   elseif target == "doc" then
-    errorlevel = dobundles(bundles, "doc")
+    errorlevel = call(bundles, "doc")
   elseif target == "install" then
-    errorlevel = dobundles (bundles, "install")
+    errorlevel = call (bundles, "install")
   elseif target == "setversion" then
-    errorlevel = dobundles(bundles, "setversion")
+    errorlevel = call(bundles, "setversion")
   elseif target == "unpack" then
-    errorlevel = dobundles (bundles, "unpack")
+    errorlevel = call (bundles, "unpack")
   elseif target == "version" then
       version ()
   else

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list