summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-12-15 18:53:51 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-12-15 18:53:51 +0100
commit3b6d2d411fdb8fdaef0a4b8045bfdc60a70ce4f0 (patch)
treefaad59ef7e0622a285d35a5484373247cc729bbb /scripts
parent2683d42fe95c59c52a9d7c334292d0a5a15c030a (diff)
downloadcontext-3b6d2d411fdb8fdaef0a4b8045bfdc60a70ce4f0.tar.gz
2019-12-15 17:34:00
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/perl/mptopdf.pl22
1 files changed, 5 insertions, 17 deletions
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 ;
}
}