diff options
author | Norbert Preining <preining@logic.at> | 2008-04-24 08:37:57 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-04-24 08:37:57 +0000 |
commit | 858be961d484a194af6ee53d299a1852d37ddc5b (patch) | |
tree | ecc342a02d070b778de1dc4b866482bfa8d5481c /Master | |
parent | b932338429235460cee5a2a055e61a0182d4dd41 (diff) |
revert texconf paper invcation, fix hundreds of things
git-svn-id: svn://tug.org/texlive/trunk@7625 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/install-tl | 5 | ||||
-rwxr-xr-x | Master/texmf/scripts/texlive/texconf.tlu | 49 | ||||
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.tlu | 4 |
3 files changed, 38 insertions, 20 deletions
diff --git a/Master/install-tl b/Master/install-tl index b4f7795e8a9..5b72c01d91b 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -807,10 +807,11 @@ sub do_postinst_stuff { "$TEXMFSYSVAR/dvips/config"); # now we have to fix up dvipdfm config file to contain the right # piping command + mkdirhier("$TEXMFSYSVAR/texmf/dvipdfm/config"); open(DVIPDFMCONFIGDIST, "<$TEXDIR/texmf/dvipdfm/config/config") or die("Cannot open $TEXDIR/texmf/dvipdfm/config/config"); - open(DVIPDFMCONFIGINST, ">$TEXMFSYSVAR/dvipdfm/config") - or die("Cannot open $TEXMFSYSVAR/dvipdfm/config"); + open(DVIPDFMCONFIGINST, ">$TEXMFSYSVAR/dvipdfm/config/config") + or die("Cannot open $TEXMFSYSVAR/dvipdfm/config/config"); while (<DVIPDFMCONFIGDIST>) { if (m/^D /) { print DVIPDFMCONFIGINST 'D "epstopdf --outfile=%o --nocompress %i"', "\n"; diff --git a/Master/texmf/scripts/texlive/texconf.tlu b/Master/texmf/scripts/texlive/texconf.tlu index a8ad142d9b3..c3597886e4b 100755 --- a/Master/texmf/scripts/texlive/texconf.tlu +++ b/Master/texmf/scripts/texlive/texconf.tlu @@ -78,7 +78,11 @@ if (sys) then else texmfconfig=kpse.var_value('TEXMFCONFIG') -- workaround for buggy(?) texlua, it does not expand ~ - userprofile = os.getenv('USERPROFILE') + if os.type == 'windows' then + userprofile = os.getenv('USERPROFILE') + else + userprogile = os.getenv('HOME') + end texmfconfig = string.gsub(texmfconfig, '^~', userprofile) end @@ -208,7 +212,7 @@ function set_dvips_papersize(papersize) end end elseif papersize=='help' then - io.stdout:write('Usage: texconf paper dvips PAPER\n\n'.. + io.stdout:write('Usage: '..usageprogname..' dvips paper PAPER\n\n'.. 'Valid PAPER settings:\n ') local buffer='' for key, val in ipairs(par_papersize) do @@ -314,7 +318,7 @@ function set_xdvi_papersize(papersize) end end elseif papersize=='help' then - io.stdout:write('Usage: texconf paper xdvi PAPER\n\n'.. + io.stdout:write('Usage: '..usageprogname..' xdvi paper PAPER\n\n'.. 'Valid PAPER settings:\n ') local buffer='' for ptype, psize in pairs(xdvi_papersize) do @@ -385,7 +389,7 @@ function set_pdftex_papersize(papersize) end end elseif papersize=='help' then - io.stdout:write('Usage: texconf paper pdftex PAPER\n\n'.. + io.stdout:write('Usage: '..usageprogname..' pdftex paper PAPER\n\n'.. 'Valid PAPER settings:\n ') local buffer='' for ptype, sizes in pairs(pdftex_papersize) do @@ -427,6 +431,10 @@ function set_dvipdfm_papersize(papersize, program) elseif program == 'dvipdfmx' then filename=kpse.find_file('dvipdfmx.cfg', 'other text files') end + if not(filename) then + print ("Cannot find config file for "..program..", exiting!") + os.exit(1) + end -- print ('< '..filename) local infile=assert(io.open(filename, 'r')) local lines={} @@ -449,7 +457,7 @@ function set_dvipdfm_papersize(papersize, program) end end elseif papersize=='help' then - io.stdout:write('Usage: texconf paper '..program..' PAPER\n\n'.. + io.stdout:write('Usage: '..usageprogname..' '..program..' paper PAPER\n\n'.. 'Valid PAPER settings:\n ') local buffer='' for i, ptype in pairs(dvipdfm_papersize) do @@ -507,11 +515,11 @@ end function usage_main() local usage={ 'help', - 'paper xdvi PAPER (xdvi paper size)', - 'paper dvips PAPER (dvips paper size)', - 'paper pdftex PAPER (pdftex paper size)', - 'paper dvipdfm PAPER (dvipdfm paper size)', - 'paper dvipdfmx PAPER (dvipdfmx paper size)', + 'xdvi paper PAPER (xdvi paper size)', + 'dvips paper PAPER (dvips paper size)', + 'pdftex paper PAPER (pdftex paper size)', + 'dvipdfm paper PAPER (dvipdfm paper size)', + 'dvipdfmx paper PAPER (dvipdfmx paper size)', 'paper [a4|letter] (paper size for all programs)' } io.stdout:write('Usage:\n') @@ -535,9 +543,9 @@ function set_prog_papersize(prog,size) elseif (prog == 'pdftex') then set_pdftex_papersize(size) elseif (prog == 'dvipdfm') then - set_dvipdfm_papersize(size) + set_dvipdfm_papersize(size, "dvipdfm") elseif (prog == 'dvipdfmx') then - set_dvipdfm_papersize(size) + set_dvipdfm_papersize(size, "dvipdfmx") end end @@ -547,20 +555,27 @@ if arg[1] == 'help' then elseif arg[1] == 'paper' then if arg[2] == 'help' or arg[2] == nil then usage_main() - elseif arg[2] == 'dvips' or arg[2] == 'xdvi' or arg[2] == 'pdftex' or - arg[2] == 'dvipdfm' or arg[2] == 'dvipdfmx' then + else + set_papersize(arg[2]) + end +elseif arg[1] == 'dvips' or arg[1] == 'xdvi' or arg[1] == 'pdftex' or + arg[1] == 'dvipdfm' or arg[1] == 'dvipdfmx' then + if arg[2] == 'help' or arg[2] == nil then + usage_paper(arg[2]) + elseif arg[2] == 'paper' then if arg[3] == 'help' or arg[3] == nil then - usage_paper(arg[2]) + usage_paper(arg[1]) else - set_prog_papersize(arg[2], arg[3]) + set_prog_papersize(arg[1], arg[3]) end else - set_papersize(arg[2]) + usage_paper(arg[1]) end else usage_main() end + if sys then command = { "mktexlsr", texmfconfig } command = fixwin(command) diff --git a/Master/texmf/scripts/texlive/tlmgr.tlu b/Master/texmf/scripts/texlive/tlmgr.tlu index 622b3cd47df..f60abe36717 100755 --- a/Master/texmf/scripts/texlive/tlmgr.tlu +++ b/Master/texmf/scripts/texlive/tlmgr.tlu @@ -194,7 +194,9 @@ elseif arg[1] == 'generate-updmap' then else os.exit(1) end -elseif arg[1] == 'paper' then +elseif arg[1] == 'paper' or + arg[1] == 'dvips' or arg[1] == 'xdvi' or arg[1] == 'pdftex' or + arg[1] == 'dvipdfm' or arg[1] == 'dvipdfmx' then -- all changes made via tlmgr paper are global script = findscript('texconf.tlu') if script then |