[latex3-commits] [l3svn] 02/02: l3build: Make public and document some os_... strings
noreply at latex-project.org
noreply at latex-project.org
Thu Apr 20 11:16:39 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 b755c0f8c2c5415e0af20a74bb396d0abda4a33f
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Apr 20 10:15:44 2017 +0100
l3build: Make public and document some os_... strings
These are needed by the LaTeX2e tests and it makes sense to simply do this
generally.
---
l3build/l3build.dtx | 44 ++++++++++++++++++++++++++++++++++++++++++++
l3build/l3build.lua | 10 +++++-----
2 files changed, 49 insertions(+), 5 deletions(-)
diff --git a/l3build/l3build.dtx b/l3build/l3build.dtx
index ada0468..2d9da6d 100644
--- a/l3build/l3build.dtx
+++ b/l3build/l3build.dtx
@@ -1231,6 +1231,50 @@
% require this form of path.
% \end{function}
%
+% \subsection{System-dependent strings}
+%
+% To support creation of additional functionality, the following low-level
+% strings are exposed by \pkg{l3build}: these all have system-dependent
+% definitions and avoid the need to test |os.type| during the construction
+% of system calls.
+%
+% \begin{variable}{os_concat}
+% The concatenation operation for using multiple commands in one
+% system call, \emph{e.g.}
+% \begin{verbatim}
+% os.execute("tex " .. file .. os_concat .. "tex " .. file)
+% \end{verbatim}
+% \end{variable}
+%
+% \begin{variable}{os_null}
+% The location to redirect commands which should produce no output
+% at the terminal: almost always used preded by |>|, \emph{e.g.}
+% \begin{verbatim}
+% os.execute("tex " .. file .. " > " .. os_null)
+% \end{verbatim}
+% \end{variable}
+%
+% \begin{variable}{os_pathsep}
+% The separator used when setting an environment variable to multiple
+% paths, \emph{e.g.}
+% \begin{verbatim}
+% os.execute(os_setenv .. " PATH=../a" .. os_pathsep .. "../b")
+% \end{verbatim}
+% \end{variable}
+%
+% \begin{variable}{os_setenv}
+% The command to set an environmental variable, \emph{e.g.}
+% \begin{verbatim}
+% os.execute(os_setenv .. " PATH=../a")
+% \end{verbatim}
+% \end{variable}
+%
+% \begin{variable}{os_yes}
+% A command to generate a series of $200$ lines each containing the
+% character |y|: this is useful as the Unix |yes| command cannot be
+% used inside |os.execute| (it does not terminate).
+% \end{variable}
+%
% \end{documentation}
%
% \begin{implementation}
diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index 94b96e9..bb16891 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -435,18 +435,18 @@ end
-- Support items are defined here for cases where a single string can cover
-- both Windows and Unix cases: more complex situations are handled inside
-- the support functions
+os_concat = ";"
+os_null = "/dev/null"
+os_pathsep = ":"
+os_setenv = "export"
+os_yes = "printf 'y\\n%.0s' {1..200}"
local os_ascii = "echo \"\""
local os_cmpexe = getenv("cmpexe") or "cmp"
local os_cmpext = getenv("cmpext") or ".cmp"
-local os_concat = ";"
local os_diffext = getenv("diffext") or ".diff"
local os_diffexe = getenv("diffexe") or "diff -c --strip-trailing-cr"
local os_grepexe = "grep"
local os_newline = "\n"
-local os_null = "/dev/null"
-local os_pathsep = ":"
-local os_setenv = "export"
-local os_yes = "printf 'y\\n%.0s' {1..200}"
if os_type == "windows" then
os_ascii = "@echo."
os_cmpexe = getenv("cmpexe") or "fc /b"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list