diff options
author | Norbert Preining <preining@logic.at> | 2009-05-04 23:49:41 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-05-04 23:49:41 +0000 |
commit | 2cde561b78156866e229cd5738aaad89daab3ee7 (patch) | |
tree | 9dd35743f4dbe4324bd5edd53726529e43af9cbe /Master | |
parent | 7def4210429e3abecf8f989f5aa44b0c7858cffb (diff) |
update tlrepo-from-minimals script
git-svn-id: svn://tug.org/texlive/trunk@12925 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/tlpkg/etc/tlrepo-from-minimals.pl | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/Master/tlpkg/etc/tlrepo-from-minimals.pl b/Master/tlpkg/etc/tlrepo-from-minimals.pl index 7dfec4dc34b..b4c33855c8c 100644 --- a/Master/tlpkg/etc/tlrepo-from-minimals.pl +++ b/Master/tlpkg/etc/tlrepo-from-minimals.pl @@ -1,9 +1,11 @@ #!/usr/bin/env perl # # tlrepo-from-minimals.pl -# Copyright 2008 Norbert Preining +# Copyright 2008, 2009 Norbert Preining # Licensed under GPLv2 or higher +my $mydir; + BEGIN { $^W = 1; chomp ($mydir = `dirname $0`); @@ -12,6 +14,7 @@ BEGIN { use strict; +use Cwd qw/abs_path/; use TeXLive::TLConfig; use TeXLive::TLPSRC; use TeXLive::TLPOBJ; @@ -37,14 +40,16 @@ my $help = 0; my $dist = "current"; my $dest = "web"; my $opt_luatex = 0; -my $opt_modules = 0; my $opt_context = 1; my $opt_all = 0; my $opt_dontclean = 0; my $source = "."; my $opt_recreate = 0; my $opt_nocontainers = 0; -my $upstreamsource = "$source/texlive"; +my $texliveminimals = abs_path("$mydir/../../.."); +my $upstreamsource = "$texliveminimals/upstream"; +my $upstreamoverride = "$texliveminimals/override"; +my $upstreamaddons = "$texliveminimals/addons"; TeXLive::TLUtils::process_logging_options(); GetOptions( @@ -52,19 +57,25 @@ GetOptions( "dist=s" => \$dist, "dest=s" => \$dest, "luatex" => \$opt_luatex, - "modules" => \$opt_modules, "context" => \$opt_context, "all" => \$opt_all, "dont-clean" => \$opt_dontclean, "recreate" => \$opt_recreate, "nocontainers" => \$opt_nocontainers, "upstream-source" => \$upstreamsource, + "upstream-override" => \$upstreamoverride, + "upstream-addons" => \$upstreamaddons, "help|?" => \$help) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; +print "location of context minimals: ", abs_path($source), "\n"; +print "location of upstream code: ", abs_path($upstreamsource), "\n"; +print "location of upstream overides: ", abs_path($upstreamoverride), "\n"; +print "location of upstream addons: ", abs_path($upstreamaddons), "\n"; + # if ($opt_all) { - $opt_luatex = $opt_context = $opt_modules = 1; + $opt_luatex = $opt_context = 1; } # @@ -122,16 +133,11 @@ if ($opt_context) { $ll =~ s/cont-(..)\.tex/$1/; system('printf \'\\\\input ' . "$bn" . '\n\\\\endinput\n\' > ' . "$tmp/texmf-dist/tex/context/config/cont-$ll.ini"); } - info("done\n"); -} - -if ($opt_modules) { - info("Copying files for ConTeXt modules ... "); - system("cp -a $source/current/modules/*/* $tmp/texmf-dist"); - system("mkdir -p $tmp/tlpkg/tlpsrc"); - system("cp $source/texlive/tlpkg/tlpsrc/context-*.tlpsrc $tmp/tlpkg/tlpsrc"); - # we didn't copy the context-letter and context-taspresent because - # they are not present in the context minimals + if (-d $upstreamaddons) { + if (-d "$upstreamaddons/context") { + system("cp -a $upstreamaddons/context/* $tmp"); + } + } info("done\n"); } @@ -150,6 +156,11 @@ if ($opt_luatex) { get_from_ups("tlpkg/tlpsrc/luatex.tlpsrc", "$tmp/tlpkg/tlpsrc"); get_from_ups("texmf/fmtutil/format.luatex.cnf", "$tmp/texmf/fmtutil/format.luatex.cnf"); + if (-d $upstreamaddons) { + if (-d "$upstreamaddons/luatex") { + system("cp -a $upstreamaddons/luatex/* $tmp"); + } + } info("done\n"); } @@ -296,10 +307,10 @@ sub get_from_ups { my ($what, $dest) = @_; my $dn = TeXLive::TLUtils::dirname($dest); system("mkdir -p $dn"); - if (-r "tl-override/$what") { - system("cp -a tl-override/$what $dest"); + if (-r "$upstreamoverride/$what") { + system("cp -a $upstreamoverride/$what $dest"); } else { - system("cp -a $source/texlive/$what $dest"); + system("cp -a $upstreamsource/$what $dest"); } } |