summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/l3build/l3build-install.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-09-24 20:23:18 +0000
committerKarl Berry <karl@freefriends.org>2018-09-24 20:23:18 +0000
commita495fe970496337011c0698a03476ce888a26105 (patch)
tree592b35bc873870f28ec4883e3ba0fdd6a4d68119 /Master/texmf-dist/scripts/l3build/l3build-install.lua
parent68966bb4bfd52e8d9d91b9fd5e6ff36d3d74a57e (diff)
l3 (24sep18)
git-svn-id: svn://tug.org/texlive/trunk@48749 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/l3build/l3build-install.lua')
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-install.lua32
1 files changed, 24 insertions, 8 deletions
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