texlive[53132]

commits+karl at tug.org commits+karl at tug.org
Sun Dec 15 00:10:13 CET 2019


Revision: 53132
          http://tug.org/svn/texlive?view=revision&revision=53132
Author:   karl
Date:     2019-12-15 00:10:12 +0100 (Sun, 15 Dec 2019)
Log Message:
-----------
resync linked_scripts/.../mptopdf to runtime

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl

Modified: trunk/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl	2019-12-14 22:51:18 UTC (rev 53131)
+++ trunk/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl	2019-12-14 23:10:12 UTC (rev 53132)
@@ -119,36 +119,34 @@
 }
 
 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 ($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  ;
     }
-    if ($done) {
-        $report .= " +" ;
-    }
-    $report .= " $pdf" ;
-    ++$done  ;
 }
 
 if ($report eq '') {



More information about the tex-live-commits mailing list