From 36207075ee39a6516879dddd8daa4e3ebb43764c Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 24 Apr 2008 09:07:53 +0000 Subject: format regeneration when paper has changed git-svn-id: svn://tug.org/texlive/trunk@7627 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf/scripts/texlive/texconf.tlu | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'Master/texmf') 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 -- cgit v1.2.3