summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2006-01-16 18:35:00 +0100
committerHans Hagen <pragma@wxs.nl>2006-01-16 18:35:00 +0100
commitdcc773eed69f48d0f2d2df6801dc8c99c2690883 (patch)
tree1380e41964afa0353869a5c75d4890ce725c8e13 /scripts
parent12edaa6671b197dc355bb301f711493bb5ad0dff (diff)
downloadcontext-dcc773eed69f48d0f2d2df6801dc8c99c2690883.tar.gz
stable 2006.01.16 18:35
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/perl/mptopdf.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/context/perl/mptopdf.pl b/scripts/context/perl/mptopdf.pl
index 5f19ecaf4..767d2d260 100644
--- a/scripts/context/perl/mptopdf.pl
+++ b/scripts/context/perl/mptopdf.pl
@@ -22,6 +22,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $
use Config ;
use Getopt::Long ;
use strict ;
+use File::Basename ;
$Getopt::Long::passthrough = 1 ; # no error message
$Getopt::Long::autoabbrev = 1 ; # partial switch accepted
@@ -43,7 +44,7 @@ my $report = '' ;
my $texlatexswitch = " --tex=latex --format=latex " ;
my $mplatexswitch = " --tex=latex " ;
-my $dosish = ($Config{'osname'} =~ /^(ms)?dos|^os\/2|^(ms|cyg)win/i) ;
+my $dosish = ($Config{'osname'} =~/^(ms)?dos|^os\/2|^mswin/i) ;
my $miktex = ($ENV{"TEXSYSTEM"} =~ /miktex/io);
my $escapeshell = ( ($ENV{'SHELL'}) && ($ENV{'SHELL'} =~ m/sh/i ));
@@ -107,8 +108,12 @@ foreach my $file (@files)
else
{ $command = "$command \\\\relax $file" }
system($command) ;
- rename ("$_.pdf", "$_-$1.pdf") ;
- if (-e "$_.pdf") { CopyFile ("$_.pdf", "$_-$1.pdf") }
+ # rename ("$_.pdf", "$_-$1.pdf") ;
+ # if (-e "$_.pdf") { CopyFile ("$_.pdf", "$_-$1.pdf") }
+ my $pdfsrc = basename($_).".pdf";
+ rename ($pdfsrc, "$_-$1.pdf") ;
+ if (-e $pdfsrc) { CopyFile ($pdfsrc, "$_-$1.pdf") }
+ # end of patch
if ($done) { $report .= " +" }
$report .= " $_-$1.pdf" ;
++$done } }