diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-08 23:45:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-08 23:45:11 +0000 |
commit | 64ee185d962cd13195e329ab4ac8a9da6535b677 (patch) | |
tree | 652f96f04e1826a75ef1c3a38ab3d2a72ff9c067 /Master/texmf-dist/scripts/l3build/l3build-clean.lua | |
parent | a502f321bf373ab83e239389e55d622e6c6980e2 (diff) |
l3build now cmdline script (9mar18)
git-svn-id: svn://tug.org/texlive/trunk@46894 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/l3build/l3build-clean.lua')
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-clean.lua | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/l3build/l3build-clean.lua b/Master/texmf-dist/scripts/l3build/l3build-clean.lua new file mode 100644 index 00000000000..3fd8396c9ce --- /dev/null +++ b/Master/texmf-dist/scripts/l3build/l3build-clean.lua @@ -0,0 +1,56 @@ +--[[ + +File l3build-clean.lua Copyright (C) 2018 The LaTeX3 Project + +It may be distributed and/or modified under the conditions of the +LaTeX Project Public License (LPPL), either version 1.3c of this +license or (at your option) any later version. The latest version +of this license is in the file + + http://www.latex-project.org/lppl.txt + +This file is part of the "l3build bundle" (The Work in LPPL) +and all files in that bundle must be distributed together. + +----------------------------------------------------------------------- + +The development version of the bundle can be found at + + https://github.com/latex3/l3build + +for those people who are interested. + +--]] + +-- Remove all generated files +function clean() + -- To make sure that distribdir never contains any stray subdirs, + -- it is entirely removed then recreated rather than simply deleting + -- all of the files + local errorlevel = + rmdir(distribdir) + + mkdir(distribdir) + + cleandir(localdir) + + cleandir(testdir) + + cleandir(typesetdir) + + cleandir(unpackdir) + for _,i in ipairs(cleanfiles) do + for _,dir in pairs(remove_duplicates({maindir, sourcefiledir, docfiledir})) do + errorlevel = rm(dir, i) + errorlevel + end + end + return errorlevel +end + +function bundleclean() + local errorlevel = call(modules, "clean") + for _,i in ipairs(cleanfiles) do + errorlevel = rm(maindir, i) + errorlevel + end + return ( + errorlevel + + rmdir(ctandir) + + rmdir(tdsdir) + ) +end + |