From e2dd3c7063699fc8045c647926b0f69db0a1399d Mon Sep 17 00:00:00 2001 From: Joseph Wright Date: Tue, 6 Mar 2018 07:31:27 +0000 Subject: [PATCH] Make scriptname a purely-internal item --- l3build-aux.lua | 4 ++++ l3build-variables.lua | 1 - l3build.dtx | 1 - l3build.lua | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/l3build-aux.lua b/l3build-aux.lua index 858beaba..76c58766 100644 --- a/l3build-aux.lua +++ b/l3build-aux.lua @@ -83,6 +83,10 @@ function call(dirs, target, opts) s = s .. " " .. v end end + local scriptname = "l3build.lua" + if not match(arg[0], "l3build(%.lua)$") then + scriptname = "build.lua" + end for _,i in ipairs(dirs) do print( "Running script " .. scriptname .. " with target \"" .. target diff --git a/l3build-variables.lua b/l3build-variables.lua index 250174f7..45a4c107 100644 --- a/l3build-variables.lua +++ b/l3build-variables.lua @@ -160,7 +160,6 @@ if flatten == nil then end maxprintline = maxprintline or 79 packtdszip = packtdszip or false -scriptname = scriptname or "build.lua" typesetcmds = typesetcmds or "" typesetruns = typesetruns or 2 versionform = versionform or "" diff --git a/l3build.dtx b/l3build.dtx index 3b3f9458..b1725900 100644 --- a/l3build.dtx +++ b/l3build.dtx @@ -151,7 +151,6 @@ \luavarset{flatten} {true} {Switch to flatten any source structure when sending to CTAN} \luavarset{maxprintline}{79} {Length of line to use in log files} \luavarset{packtdszip} {false} {Switch to build a TDS-style zip file for CTAN} -\luavarset{scriptname} {"build.lua"} {Name of script used in dependencies} \luavarset{typesetcmds} {""} {Instructions to be passed to \TeX{} when doing typesetting.} \luavarset{typsetcycles}{3} {Number of cycles of typesetting to carry out.} \luavarset{versionform} {""} {Nature of version strings for auto-replacement.} diff --git a/l3build.lua b/l3build.lua index ed3bd826..78b54e5b 100644 --- a/l3build.lua +++ b/l3build.lua @@ -69,7 +69,6 @@ main = main or stdmain -- Load configuration file if running as a script if match(arg[0], "l3build(%.lua)$") then - scriptname = "l3build.lua" -- Options which do not need any configuration if options["help"] then help()