diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2011-06-04 12:13:34 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2011-06-04 12:13:34 +0000 |
commit | a81d5cc5602a99e035494e0160d81d081ae38209 (patch) | |
tree | 8e850e460594c0fc4bf9388d35830a1b1c91dae6 /Master/install-tl | |
parent | 34cb0fd03499f7bbd965a913ad36707781998d0d (diff) |
Update the generation of texmfcnf.lua
git-svn-id: svn://tug.org/texlive/trunk@22773 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 43 |
1 files changed, 31 insertions, 12 deletions
diff --git a/Master/install-tl b/Master/install-tl index 84004243552..0155b8c3108 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -938,7 +938,6 @@ sub do_texmf_cnf { my @changedtmf = (); # install to disk: write only changed items my $yyyy = $TeXLive::TLConfig::ReleaseYear; - my $rewritetmflua = 0; # need a new texmfcnf.lua? # we have to find TEXMFLOCAL TEXMFSYSVAR and TEXMFHOME foreach my $line (@texmfcnflines) { @@ -961,7 +960,6 @@ sub do_texmf_cnf { } elsif ($line =~ m/^TEXMFVAR/) { if ($vars{"TEXMFVAR"} ne "~/.texlive$yyyy/texmf-var") { push @changedtmf, "TEXMFVAR = $vars{'TEXMFVAR'}\n"; - $rewritetmflua = 1; # TEXMFVAR change -> new texmfcnf.lua } } elsif ($line =~ m/^TEXMFCONFIG/) { if ("$vars{'TEXMFCONFIG'}" ne "~/.texlive$yyyy/texmf-config") { @@ -1018,21 +1016,42 @@ EOF } close(TMF) || warn "close($TMF) failed: $!"; - if ($rewritetmflua) { - $TMFLUA = ">$vars{'TEXDIR'}/texmfcnf.lua"; - open(TMFLUA, $TMFLUA) || die "open($TMFLUA) failed: $!"; - + $TMFLUA = ">$vars{'TEXDIR'}/texmfcnf.lua"; + open(TMFLUA, $TMFLUA) || die "open($TMFLUA) failed: $!"; print TMFLUA <<EOF; -- (Public domain.) --- This texmfcnf.lua file should exist only if you have personal changes --- from the distributed file; for example, if TEXMFVAR was changed in --- the installer. +-- This texmfcnf.lua file should contain only your personal changes from the +-- original texmfcnf.lua (for example, as chosen in the installer). -- -return { TEXMFCACHE = '$vars{"TEXMFVAR"}' } +-- That is, if you need to make changes to texmfcnf.lua, put your custom +-- settings in this file, which is .../texlive/YYYY/texmfcnf.lua, rather than +-- the distributed file (which is .../texlive/YYYY/texmf/web2c/texmfcnf.lua). +-- And include *only* your changed values, not a copy of the whole thing! + +return { + content = { + variables = { EOF - - close(TMFLUA) || warn "close($TMFLUA) failed: $!"; +; + foreach (@changedtmf) { + my $luavalue = $_; + $luavalue =~ s/^(\w+\s*=\s*)(.*)\s*$/$1\"$2\",/; + $luavalue =~ s/\$SELFAUTOPARENT/selfautoparent:/g; + print TMFLUA " $luavalue\n"; + } + print TMFLUA " },\n"; + print TMFLUA " },\n"; + if (!$vars{"option_write18_restricted"}) { + print TMFLUA <<EOF; + directives = { + -- Disable system commands. See texmf/web2c/texmfcnf.lua + ["system.commandmode"] = "none", + }, +EOF +; } + print TMFLUA "}\n"; + close(TMFLUA) || warn "close($TMFLUA) failed: $!"; } |