diff options
author | Norbert Preining <preining@logic.at> | 2008-04-16 10:30:44 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-04-16 10:30:44 +0000 |
commit | 819a736f4a34367ec63da21b0c221cd4749ab0d1 (patch) | |
tree | 9a624ca46063606b55fb7923084f40f5dcd93302 /Master/texmf/scripts | |
parent | cbcd661b4ec0163299c6494524dd5ad2afbdef38 (diff) |
rework installation
git-svn-id: svn://tug.org/texlive/trunk@7445 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rwxr-xr-x | Master/texmf/scripts/texlive/tl-package-manager.pl | 83 |
1 files changed, 73 insertions, 10 deletions
diff --git a/Master/texmf/scripts/texlive/tl-package-manager.pl b/Master/texmf/scripts/texlive/tl-package-manager.pl index 56d23fa19c1..f3ea8c3ab82 100755 --- a/Master/texmf/scripts/texlive/tl-package-manager.pl +++ b/Master/texmf/scripts/texlive/tl-package-manager.pl @@ -26,6 +26,7 @@ use TeXLive::TLPOBJ; use TeXLive::TLPDB; use TeXLive::TLConfig; use TeXLive::TLMedia; +use TeXLive::TLUtils; use Cwd qw/abs_path/; use Getopt::Long; use Pod::Usage; @@ -52,12 +53,16 @@ my $opt_help = 0; my $opt_debug = 0; my $opt_force = 0; my $opt_dry = 0; +my $localconf = ""; +my $dest = ""; GetOptions("location=s" => \$opt_location, "netarchive=s" => \$NetArchive, "diskarchive=s" => \$DiskArchive, "no-depends" => \$opt_nodepends, "force" => \$opt_force, + "localcfg=s" => \$localconf, + "dest=s" => \$dest, "dry-run" => \$opt_dry, "debug!", "h|help|?" => \$opt_help) or pod2usage(1); @@ -89,19 +94,52 @@ if (defined($opt_location)) { $location = $opt_location; } -# in most cases we need to have access to the wget/tar/etc for win32 -# and TLPDB assumes that wget.exe is in the path, so for win32 we -# add the tlpkg/installer to the path -# That could be solved the way that TLPDB uses for win32 always the -# wget from root/tlpkg/installer/. This would also allow to remove the -# adding of the installer dir to the path in install-tl.bat -if ($^O=~/^MSWin(32|64)$/i) { - $ENV{'PATH'} = "$Master/tlpkg/installer;$ENV{'PATH'}"; -} +# setup the programs, for win32 we need the shipped wget/lzma etc, so we +# pass the location of these files to setup_programs. +setup_programs("$Master/tlpkg/installer", $localtlpdb->option_platform); my $ret = 0; -if ($action =~ m/^install$/i) { +if ($action =~ m/^generate$/i) { + my $what = shift; + #my $localconf = ""; + #my $dest = ""; + #GetOptions("localcfg=s" => \$localconf, "dest=s" > \$dest,) or pod2usage(1); + if ($what =~ m/^language$/i) { + $dest || ($dest = kpsewhich ("TEXMFSYSVAR") . "/tex/generic/config/language.dat"); + $localconf || ($localconf = kpsewhich ("TEXMFLOCAL") . "/tex/generic/config/language-local.dat"); + tllog ($::LOG_NORMAL, "$0: writing language data to $dest\n"); + TeXLive::TLUtils::create_language ($localtlpdb, $dest, $localconf); + } elsif ($what =~ m/^fmtutil$/i) { + $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/fmtutil.cnf"); + $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/fmtutil-local.cnf"); + tllog($::LOG_NORMAL, "writing fmtutil.cnf data to $dest\n"); + TeXLive::TLUtils::create_fmtutil($localtlpdb, $dest, $localconf); + } elsif ($what =~ m/^fmtutil$/i) { + $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/updmap.cfg"); + $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/updmap-local.cfg"); + tllog($::LOG_NORMAL, "$0: writing new updmap.cfg to $dest\n"); + TeXLive::TLUtils::create_updmap ($localtlpdb, $dest, $localconf); + } else { + die "Unknown option for generate: $what"; + } + # should we do some postinst actions? + exit(0); +} elsif ($action =~ m/^list$/i) { + my $what = shift; + if ($what =~ m/^collection/i) { + # should we list ALL or only the installed ones? + #foreach ($localtlpdb->collections) { + # print "$_\n"; + #} + # list all available collections + } elsif ($what =~ m/^scheme/i) { + # list all available schemes + } else { + # list everything + } + exit(0); +} elsif ($action =~ m/^install$/i) { # initialize the TLMedia from $location $tlmediasrc = TeXLive::TLMedia->new($location); foreach my $pkg (@ARGV) { @@ -468,6 +506,31 @@ for the given argument (interpreted as regexp). Search the names and short descriptions of all packages available on the install media. +=item B<generate language> + +=item B<generate fmtutil> + +=item B<generate updmap> + +Generate language.dat, fmtutil.cnf, and updmap.cfg from a TLPDB and local +additions + +B<Supported options> + +=over 16 + +=item C<-dest> I<output file> + +specifies the output file (defaults to the respective location in TEXMFSYSVAR). + +=item C<-localcfg> I<local conf file> + +specifies the (optional) local additions (defaults to the respective location +in TEXMFSYSVAR). + +=back + + =back =head1 OPTIONS |