From a495fe970496337011c0698a03476ce888a26105 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 24 Sep 2018 20:23:18 +0000 Subject: l3 (24sep18) git-svn-id: svn://tug.org/texlive/trunk@48749 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/scripts/l3build/l3build-install.lua | 32 ++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'Master/texmf-dist/scripts/l3build/l3build-install.lua') diff --git a/Master/texmf-dist/scripts/l3build/l3build-install.lua b/Master/texmf-dist/scripts/l3build/l3build-install.lua index 88ac5bad6f3..12c59914916 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-install.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-install.lua @@ -29,6 +29,7 @@ local set_program = kpse.set_program_name local var_value = kpse.var_value local gsub = string.gsub +local lower = string.lower local match = string.match local insert = table.insert @@ -132,14 +133,6 @@ function install_files(target,full,dry_run) end local errorlevel = unpack() if errorlevel ~= 0 then return errorlevel end - errorlevel = install_files(unpackdir,"tex",{installfiles}) - + install_files(unpackdir,"bibtex/bst",{bstfiles},module,true) - + install_files(unpackdir,"makeindex",{makeindexfiles},module,true) - + install_files(unpackdir,"scripts",{scriptfiles},module) - if errorlevel ~= 0 then return errorlevel end - if full then - errorlevel = doc() - if errorlevel ~= 0 then return errorlevel end -- Creates a 'controlled' list of files local function excludelist(dir,include,exclude) @@ -165,6 +158,11 @@ function install_files(target,full,dry_run) return includelist end + local installlist = excludelist(unpackdir,installfiles,{scriptfiles}) + + if full then + errorlevel = doc() + if errorlevel ~= 0 then return errorlevel end -- For the purposes here, any typesetting demo files need to be -- part of the main typesetting list local typesetfiles = typesetfiles @@ -188,6 +186,16 @@ function install_files(target,full,dry_run) {bibfiles,demofiles,docfiles,pdffiles,textfiles,typesetlist}) if errorlevel ~= 0 then return errorlevel end + -- Rename README if necessary + if not dry_run then + if ctanreadme ~= "" and not match(lower(ctanreadme),"^readme%.%w+") then + local installdir = target .. "/doc/" .. moduledir + if fileexists(installdir .. "/" .. ctanreadme) then + ren(installdir,ctanreadme,"README." .. match(ctanreadme,"%.(%w+)$")) + end + end + end + -- Any script man files need special handling local manfiles = { } for _,glob in pairs(scriptmanfiles) do @@ -210,6 +218,14 @@ function install_files(target,full,dry_run) end end end + + if errorlevel ~= 0 then return errorlevel end + + errorlevel = install_files(unpackdir,"tex",{installlist}) + + install_files(unpackdir,"bibtex/bst",{bstfiles},module,true) + + install_files(unpackdir,"makeindex",{makeindexfiles},module,true) + + install_files(unpackdir,"scripts",{scriptfiles},module) + return errorlevel end -- cgit v1.2.3