summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/texconf.tlu26
1 files changed, 22 insertions, 4 deletions
diff --git a/Master/texmf/scripts/texlive/texconf.tlu b/Master/texmf/scripts/texlive/texconf.tlu
index c3597886e4b..cec0cebd3fe 100755
--- a/Master/texmf/scripts/texlive/texconf.tlu
+++ b/Master/texmf/scripts/texlive/texconf.tlu
@@ -7,9 +7,6 @@
-- texconf is a subset of Thomas Esser's texconfig shell script.
--
--- TODO
--- . call mktexlsr texmfconfig only if something has changed, not
--- in the case of usage messages
function fixwin(args_unix)
if os.type == 'windows' then
@@ -36,6 +33,9 @@ basename=select(1, string.gsub(filename, '\.tlu$', ''))
usageprogname = basename
+domktexlsr = false
+doformat = false
+
sys=false
if string.find(basename, '-sys$') then
@@ -274,6 +274,7 @@ function set_dvips_papersize(papersize)
end
config:close()
print ('> '..texmfconfig..'/dvips/config/config.ps')
+ domktexlsr = true
end
end -- set_dvips_papersize
@@ -342,6 +343,7 @@ function set_xdvi_papersize(papersize)
end
config:close()
print ('> '..texmfconfig..'/xdvi/XDvi')
+ domktexlsr = true
end
end
@@ -417,6 +419,8 @@ function set_pdftex_papersize(papersize)
end
config:close()
print ('> '..outfile)
+ domktexlsr = true
+ doformat = true
end
end
@@ -489,6 +493,7 @@ function set_dvipdfm_papersize(papersize, program)
end
end
config:close()
+ domktexlsr = true
end
end
@@ -576,12 +581,25 @@ else
end
-if sys then
+if sys and domktexlsr then
command = { "mktexlsr", texmfconfig }
command = fixwin(command)
os.spawn(command)
end
+if doformat then
+ -- we have to update the formats
+ -- I don't know how to select only those formats for which pdftexconfig.tex
+ -- is necessary, so we call fmtutil-sys --refresh
+ -- that will recreate a lot, sorry
+ if sys then
+ command = { "fmtutil-sys", "--refresh" }
+ else
+ command = { "fmtutil", "--refresh" }
+ end
+ os.spawn(command)
+end
+
-- Local Variables:
-- lua-indent-level: 2
-- tab-width: 2