diff options
Diffstat (limited to 'Master/tlpkg/libexec/ctan2tds')
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index e07ddeeef34..0e5e28f9c37 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -41,9 +41,10 @@ chdir "../tmp.cooked" || die "chdir(../tmp.cooked) failed: $!"; $COOKED_TOP = getcwd(); # output (cooked) directory paren chdir $RAW_DIR || die "chdir($RAW_DIR) failed: $!"; # back to raw -# the real Master and Build tree. +# the Master, Build, and CTAN trees. chomp ($Master = `cd $mydir/../.. && pwd`); chomp ($Build = `cd $Master/../Build/source && pwd`); +chomp (my $ctan_root = `tlpkginfo --ctan-root`); # @@ -653,6 +654,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'lastbib', "die 'skipping, nonfree'", 'latex-base', "die 'skipping, use latex'", 'latex-doc', "die 'skipping, use latex'", + 'latex-doc-dev', "die 'skipping, use latex-base-dev'", 'latex-essential', "die 'skipping, nonfree'", 'latex-fonts', "&MAKEflatten", 'latex-graphics', "die 'skipping, use graphics'", @@ -1470,6 +1472,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'kotex-oblivoir' => '&POSTkotex_oblivoir', 'kotex-utf' => '&POSTkotex_utf', 'l3build' => '&POST_do_man', + 'latex-base-dev' => '&POSTlatex_base_dev', 'latex2e-help-texinfo' => '&POSTlatex2e_help_texinfo', 'lhcyr' => '&POSTlhcyr', 'lilyglyphs' => '&POSTlilyglyphs', @@ -3465,13 +3468,27 @@ sub rename_with_mkdir { sub SYSTEM { my ($job) = @_; if ($opt_test) { - print "\t SYSTEM $job\n"; + print "\t SYSTEM $job # test\n"; } else { print "\t SYSTEM $job\n" if $opt_debug; system ($job); } } +# system but abort if the command fails. +# +sub xsystem { + my ($cmd) = @_; + + print "\t XSYSTEM $cmd\n"; + + unless ($opt_test) { + my $ret = system ($cmd); + $ret /= 256; + die "`$cmd' failed, status=$ret, goodbye\n" if $ret != 0; + } +} + # Return .exe or empty string, as required by PLATFORM. # sub exeext { @@ -4213,7 +4230,6 @@ sub killfiles { if ($more && @delfiles) { # get package url on CTAN my $ctan_url = '.'; - chomp (my $ctan_root = `tlpkginfo --ctan-root`); chomp (my $ctan_dir = `tlpkginfo --ctan-dir $packagedir`); if (not $?) { $ctan_dir =~ s!$ctan_root/!!; @@ -5454,7 +5470,6 @@ sub PREHOOK_concrete { print "PREHOOK_$package - instantiate symlinks from symlink\n"; # would be better done in tlpkginfo --prepare. &xchdir ("mf"); - chomp (my $ctan_root = `tlpkginfo --ctan-root`); for my $mf (glob ("*.mf")) { &SYSTEM ("$CP $ctan_root/systems/knuth/local/cm/$mf .."); } @@ -6314,8 +6329,22 @@ sub POSTlatex2html { &SYSTEM ("$MV $DEST/scripts/latex2html/styles/$package.perl $dest"); } +sub POSTlatex_base_dev { + my $tds_basename = "latex-doc-dev.tds.zip"; + print "POST$package - also include $tds_basename\n"; + # latex-base-dev and latex-doc-dev both unpack (different files) into + # the same directories. We don't want to explicitly list the + # individual files that belong to each package, so just always do + # latex-doc-dev if we're doing latex-base-dev. Since a .tds.zip is + # provided, this is easy. + my $docdev_tds_zip = "$ctan_root/install/macros/latex-dev/$tds_basename"; + &xsystem ("unzip -q -d $DEST $docdev_tds_zip"); + # + &SYSTEM ("rm -rf $DEST/makeindex"); # won't be uploaded later +} + sub POSTlatex2e_help_texinfo { - print "POST$package - remove translation subdir\n"; + print "POST$package - remove spanish translation subdir\n"; &SYSTEM ("$RM -rf spanish"); } |