[latex3-commits] [git/l3build] master: Add a dry-run capablity for install target (fixes #45) (3bf8649)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Jan 3 15:27:02 CET 2018
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/3bf8649f8fd95e6cf2fe101773206500d343e513
>---------------------------------------------------------------
commit 3bf8649f8fd95e6cf2fe101773206500d343e513
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Jan 3 14:27:02 2018 +0000
Add a dry-run capablity for install target (fixes #45)
At present we don't have a short option name here: it's sufficiently
specialised that one doesn't seem required.
>---------------------------------------------------------------
3bf8649f8fd95e6cf2fe101773206500d343e513
l3build.dtx | 2 ++
l3build.lua | 14 +++++++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/l3build.dtx b/l3build.dtx
index c783e54..326b229 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -314,6 +314,8 @@
% \item \texttt{--config} (\texttt{-c}) Configuration(s) to use for testing
% \item \texttt{--date} (\texttt{-d}) Date to use when setting version
% data
+% \item \texttt{--dry-run} Runs the \texttt{install} target but does not copy
+% any files: simply lists those that would be installed
% \item \texttt{--engine} (\texttt{-e}) Sets the engine to use for
% testing
% \item \texttt{--force} (\texttt{-f}) Force checks to run even if sanity
diff --git a/l3build.lua b/l3build.lua
index 5979b68..d2f9966 100644
--- a/l3build.lua
+++ b/l3build.lua
@@ -257,6 +257,11 @@ local option_list =
short = "d",
type = "string"
},
+ ["dry-run"] =
+ {
+ desc = "Dry run for install",
+ type = "boolean"
+ },
engine =
{
desc = "Sets the engine(s) to use for running test",
@@ -2199,8 +2204,15 @@ function install()
if errorlevel ~= 0 then
return errorlevel
end
+ print()
for _,i in ipairs(installfiles) do
- errorlevel = cp(i, unpackdir, installdir)
+ if options["dry-run"] then
+ for _,file in pairs(filelist(unpackdir,i)) do
+ print("Would install " .. file)
+ end
+ else
+ errorlevel = cp(i, unpackdir, installdir)
+ end
if errorlevel ~= 0 then
return errorlevel
end
More information about the latex3-commits
mailing list