diff options
author | Norbert Preining <preining@logic.at> | 2007-12-03 15:35:04 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-12-03 15:35:04 +0000 |
commit | 9966918975f7791e33a9a6e8064a5553fa6955a6 (patch) | |
tree | 3ec4694e2af0f28897b072d64a8cbdc590c1ea98 /Master/install-tl.pl | |
parent | 8769358c65a1821de408076b69cf94f3ce2073a4 (diff) |
move the create_(fmtutil|updmap|language) to TLUtils, document them,
and use them in instll-tl.pl. We will need them anyway in the updater.
git-svn-id: svn://tug.org/texlive/trunk@5698 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-x | Master/install-tl.pl | 69 |
1 files changed, 5 insertions, 64 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl index a6643eb7358..653affbb69a 100755 --- a/Master/install-tl.pl +++ b/Master/install-tl.pl @@ -24,7 +24,8 @@ BEGIN { use TeXLive::TLUtils qw(initialize_installer media platform platform_desc debug which getenv win32 unix program_exists architectures_available additional_architectures_available_from_net get_system_tmpdir member - mkdirhier make_var_skeleton make_local_skeleton install_package copy); + mkdirhier make_var_skeleton make_local_skeleton install_package copy + create_fmtutil create_updmap create_language); use TeXLive::TLPOBJ; use TeXLive::TLPDB; use TeXLive::TLConfig; @@ -169,9 +170,9 @@ if ($opt_profile eq "") { calc_depends(); prepare_installation(); do_install_packages(); -create_fmtutil(); -create_updmap(); -create_language(); +create_fmtutil($localtlpdb,$vars{'TEXMFSYSVAR'},$vars{'TEXMFLOCAL'}); +create_updmap($localtlpdb,$vars{'TEXMFSYSVAR'},$vars{'TEXMFLOCAL'}); +create_language($localtlpdb,$vars{'TEXMFSYSVAR'},$vars{'TEXMFLOCAL'}); do_postinst_stuff(); dump_vars('./vars'); # if we installed from a profile we don't need to write it out @@ -534,66 +535,6 @@ sub do_install_packages { $localtlpdb->save; } -sub create_fmtutil { - my @lines = $localtlpdb->fmtutil_cnf_lines; - if (-r "$vars{'TEXMFLOCAL'}/web2c/fmtutil-local.cnf") { - # - # this should be done more intelligently, but for now only add those - # lines without any duplication check ... - open FOO, "<$vars{'TEXMFLOCAL'}/web2c/fmtutil-local.cnf" - or die "strange -r but cannot open?\n"; - my @tmp = <FOO>; - push @lines, @tmp; - } - if ($#lines >= 0) { - my $fmtutilpath = "$vars{'TEXMFSYSVAR'}/web2c/fmtutil.cnf"; - open(OUTFILE,">$fmtutilpath") - or die("Cannot open $fmtutilpath for writing!\n"); - foreach (@lines) { print OUTFILE; } - close(OUTFILE); - } -} - -sub create_updmap { - my @lines = $localtlpdb->updmap_cfg_lines; - if (-r "$vars{'TEXMFLOCAL'}/web2c/updmap-local.cfg") { - # - # this should be done more intelligently, but for now only add those - # lines without any duplication check ... - open FOO, "<$vars{'TEXMFLOCAL'}/web2c/updmap-local.cfg" - or die "strange -r but cannot open?\n"; - my @tmp = <FOO>; - push @lines, @tmp; - } - if ($#lines >= 0) { - my $updmapcfgpath = "$vars{'TEXMFSYSVAR'}/web2c/updmap.cfg"; - open(OUTFILE,">$updmapcfgpath") - or die("Cannot open $updmapcfgpath for writing!\n"); - foreach (@lines) { print OUTFILE; } - close(OUTFILE); - } -} - -sub create_language { - my @lines = $localtlpdb->language_dat_lines; - if (-r "$vars{'TEXMFLOCAL'}/tex/generic/config/language-local.dat") { - # - # this should be done more intelligently, but for now only add those - # lines without any duplication check ... - open FOO, "<$vars{'TEXMFLOCAL'}/tex/generic/config/language-local.dat" - or die "strange -r but cannot open?\n"; - my @tmp = <FOO>; - push @lines, @tmp; - } - if ($#lines >= 0) { - my $lanpath = "$vars{'TEXMFSYSVAR'}/tex/generic/config/language.dat"; - open(OUTFILE,">$lanpath") - or die("Cannot open $lanpath for writing!\n"); - foreach (@lines) { print OUTFILE; } - close(OUTFILE); - } -} - # do_postinst_stuff has to fix up the texmf tree and install some missing # files. The things to do are taken from the install-live.sh installer # of former times, and should be critically checked. |