summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-12-14 23:10:12 +0000
committerKarl Berry <karl@freefriends.org>2019-12-14 23:10:12 +0000
commit9ee4ded9cfe164f66b345f0687831b6a28984c09 (patch)
tree3fb667f7cc6c13c0f4dbc8c28714b3b4d0d57595 /Build
parent310a9b412be68e6d2c9fc9a28c3e159d6e40022b (diff)
resync linked_scripts/.../mptopdf to runtime
git-svn-id: svn://tug.org/texlive/trunk@53132 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl54
1 files changed, 26 insertions, 28 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl b/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl
index d5d238ce1e7..42db9001ec4 100755
--- a/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl
+++ b/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl
@@ -119,36 +119,34 @@ if (($pattern eq '')||($Help)) {
}
foreach my $file (@files) {
- my ($base, $suffix) = $file =~ m/(\w+)\.(\d+|mps|ps)/ ;
- next unless -e $file and defined $suffix ;
- my $pdf = $base.".pdf" ;
- if ($miktex) {
- $command = "pdftex -undump=mptopdf" ;
- } else {
- $command = "pdftex -fmt=mptopdf -progname=context" ;
- }
- if ($dosish) {
- $command = "$command \\relax $file" ;
- } else {
- $command = "$command \\\\relax $file" ;
- }
- my $error = system($command) ;
- if ($error) {
- print "\n$program : error while processing tex file\n" ;
- exit 1 ;
- }
- if ($suffix =~ m/\d+$/) {
- rename ($pdf, "$base-$suffix.pdf") ;
- if (-e $pdf) {
- CopyFile ($pdf, "$base-$suffix.pdf") ;
+ $_ = $file ;
+ if (s/\.(\d+|mps)$// && -e $file) {
+ if ($miktex) {
+ $command = "pdftex -undump=mptopdf" ;
+ } else {
+ $command = "pdftex -fmt=mptopdf -progname=context" ;
}
- $pdf = "$base-$suffix.pdf" ;
- }
- if ($done) {
- $report .= " +" ;
+ if ($dosish) {
+ $command = "$command \\relax $file" ;
+ } else {
+ $command = "$command \\\\relax $file" ;
+ }
+ my $error = system($command) ;
+ if ($error) {
+ print "\n$program : error while processing tex file\n" ;
+ exit 1 ;
+ }
+ my $pdfsrc = basename($_).".pdf";
+ rename ($pdfsrc, "$_-$1.pdf") ;
+ if (-e $pdfsrc) {
+ CopyFile ($pdfsrc, "$_-$1.pdf") ;
+ }
+ if ($done) {
+ $report .= " +" ;
+ }
+ $report .= " $_-$1.pdf" ;
+ ++$done ;
}
- $report .= " $pdf" ;
- ++$done ;
}
if ($report eq '') {