From 3b6d2d411fdb8fdaef0a4b8045bfdc60a70ce4f0 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 15 Dec 2019 18:53:51 +0100 Subject: 2019-12-15 17:34:00 --- scripts/context/perl/mptopdf.pl | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'scripts') diff --git a/scripts/context/perl/mptopdf.pl b/scripts/context/perl/mptopdf.pl index 165d4d217..d653029a6 100644 --- a/scripts/context/perl/mptopdf.pl +++ b/scripts/context/perl/mptopdf.pl @@ -118,14 +118,9 @@ if (($pattern eq '')||($Help)) { @files = glob "$pattern" ; } -# this patch was send via debian but is not tested by me - foreach my $file (@files) { $_ = $file ; - # if (s/\.(\d+|mps)$// && -e $file) { if (s/\.(\d+|mps|ps)$// && -e $file) { - my $suffix = $1 ; - my $pdf = basename($_).".pdf" ; if ($miktex) { $command = "pdftex -undump=mptopdf" ; } else { @@ -141,22 +136,15 @@ foreach my $file (@files) { 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 ($suffix =~ m/\.\d+$/) { - rename ($pdf, "$_-$suffix.pdf") ; - if (-e $pdf) { - CopyFile ($pdf, "$_-$suffix.pdf") ; - } - $pdf = "$_-$suffix.pdf" ; + my $pdfsrc = basename($_).".pdf"; + rename ($pdfsrc, "$_-$1.pdf") ; + if (-e $pdfsrc) { + CopyFile ($pdfsrc, "$_-$1.pdf") ; } if ($done) { $report .= " +" ; } - # $report .= " $_-$1.pdf" ; - $report .= " $pdf" ; + $report .= " $_-$1.pdf" ; ++$done ; } } -- cgit v1.2.3