[latex3-commits] [l3svn] 09/09: l3build: Retain basname() and add dirname()

noreply at latex-project.org noreply at latex-project.org
Sun Jun 25 09:30:29 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 7c92f33b7cbd10eb1793197675c46825d7eef239
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Jun 25 08:29:19 2017 +0100

    l3build: Retain basname() and add dirname()
    The former is already documented and so has to stay, the latter
    is handy and I feel clearer than splitpath() ... I'm not a fan
    of multiple return values, though.
 l3build/l3build.lua |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index dd6da5a..be38a58 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -1457,6 +1457,15 @@ function splitpath(file)
+-- Arguably clearer names
+function basename(file)
+  return(select(2, splitpath(file)))
+function dirname(file)
+  return(select(1, splitpath(file)))
 -- Strip the extension from a file name (if present)
 function jobname(file)
   local name = match(select(2, splitpath(file)), "^(.*)%.")

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

More information about the latex3-commits mailing list