diff options
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index a05f129581b..afaa5eecdfc 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -2843,10 +2843,25 @@ my $core_latex = "$Master/texmf-dist/tex/latex"; 'velthuis' => 'latex', # requires interaction 'xduthesis' => 'tex', 'xecjk' => 'xecjk-xelatex', - 'xskak' => 'latex', # requires interaction 'yathesis' => 'pdftex', ); -$standardinsrunner="latex -interaction=nonstopmode"; +$standardinsrunner = "latex"; +$standardinsrunner_opt = "-interaction=nonstopmode"; +# +# We separate the (non)interaction option from the command name +# because we don't ever want interaction, regardless of the command. +# +# We can't pipe yes| into the command to get around the ins overwrite +# problem since then "y" might get used as a filename, and we can exit +# successfully when files didn't get generated as intended (e.g., in a +# subdirectory, as required by apa7 and others). We have a special case +# to report this in runjob, but we don't want it to happen in the first place. +# +# This setup fails in cases where an existing file is being generated, +# e.g., velthuis, and LaTeX asks: +# File ./hindi.ldf already exists on the system. +# Overwrite it? [y/n] +# Not sure what to do about this yet. %specialmakeindex= ( @@ -3470,6 +3485,9 @@ for (@ARGV) { $inspatt = $specialins{$package} || &specialins($package) || $standardins; $insrunner = $specialinsrunner{$package} || $standardinsrunner; + $insrunner_opt = $specialinsrunner_opt{$package} || $standardinsrunner_opt; + $invoke_insrunner = "$insrunner $insrunner_opt"; + $Foundry = $specialfoundry{$package} || $standardfoundry; if (exists $special{$package}) { @@ -3842,7 +3860,8 @@ sub runins { for (grep (/$thispatt/, @filenames)) { my $env_mktex = "env MKTEXTFM=0 MKTEXMF=0 MKTEXPK=0"; # do not infinite loop on docstrip "output directory", e.g., fltpoint. - &runjob ("yes | sed 1000q | $env_mktex $insrunner $_"); + #&runjob ("yes | sed 1000q | $env_mktex $insrunner $_"); + &runjob ("$invoke_insrunner $_"); # bbold.dtx generates bbold.ins, and then does "low level hacks" to # run the .ins itself. mathfont.dtx generates mathfont.ins to no @@ -3854,7 +3873,8 @@ sub runins { # .ins is not in @filenames), and the .ins creates the .sty. # So we have to run the .ins. if (! grep (/$package\.ins$/, @filenames) && -r "$package.ins") { - &runjob ("yes | sed 10q | $env_mktex $insrunner $package.ins"); + #&runjob ("yes | sed 10q | $env_mktex $insrunner $package.ins"); + &runjob ("$invoke_insrunner $package.ins"); } } @@ -4288,7 +4308,7 @@ sub runjob { } else { my $Jobid = "_$$"; chomp (my $PWD = `pwd`); - &SYSTEM ("$job >$PWD/$Jobid.log 2>&1"); + &SYSTEM ("$job </dev/null >$PWD/$Jobid.log 2>&1"); $status = $?; local *TMP; open (TMP, "$Jobid.log") || die "open($Jobid.log) failed: $!"; |