summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-10-01 16:40:05 +0000
committerKarl Berry <karl@freefriends.org>2019-10-01 16:40:05 +0000
commitadd7192365aa48a9db779ecd4f34168380477223 (patch)
tree2019f3fe72cb4933839b1f7a334609f65682c12c /Master/texmf-dist/scripts
parent42096a6db82c3181bbe2986561e0e370ab21eae6 (diff)
mptopdf
git-svn-id: svn://tug.org/texlive/trunk@52238 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-xMaster/texmf-dist/scripts/context/perl/mptopdf.pl24
1 files changed, 18 insertions, 6 deletions
diff --git a/Master/texmf-dist/scripts/context/perl/mptopdf.pl b/Master/texmf-dist/scripts/context/perl/mptopdf.pl
index 42db9001ec4..165d4d2179f 100755
--- a/Master/texmf-dist/scripts/context/perl/mptopdf.pl
+++ b/Master/texmf-dist/scripts/context/perl/mptopdf.pl
@@ -118,9 +118,14 @@ 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)$// && -e $file) {
+ if (s/\.(\d+|mps|ps)$// && -e $file) {
+ my $suffix = $1 ;
+ my $pdf = basename($_).".pdf" ;
if ($miktex) {
$command = "pdftex -undump=mptopdf" ;
} else {
@@ -136,15 +141,22 @@ 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") ;
+ # 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" ;
}
if ($done) {
$report .= " +" ;
}
- $report .= " $_-$1.pdf" ;
+ # $report .= " $_-$1.pdf" ;
+ $report .= " $pdf" ;
++$done ;
}
}