diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-02-23 09:18:32 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-02-23 09:18:32 +0000 |
commit | fb977fe4153eebe74249d1769da5b50ba68d897c (patch) | |
tree | 15b49d367f5a13ddf453411f0bc6dcf211454b00 /win32/bin | |
parent | b990f8c8eb4a74efc0bfc3103a9910ad3c79c062 (diff) | |
download | perl-fb977fe4153eebe74249d1769da5b50ba68d897c.tar.gz |
[win32] fix pl2bat.pl to tolerate trailing .bat (as suggested by
John Cavanaugh <cavanaug@sdd.hp.com>)
p4raw-id: //depot/win32/perl@571
Diffstat (limited to 'win32/bin')
-rw-r--r-- | win32/bin/pl2bat.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/win32/bin/pl2bat.pl b/win32/bin/pl2bat.pl index 73ae87164d..0f67fd4023 100644 --- a/win32/bin/pl2bat.pl +++ b/win32/bin/pl2bat.pl @@ -22,12 +22,17 @@ $OPT{'a'} = ($^O eq 'MSWin32' and &Win32::IsWinNT ? '-x -S %0 %*' : '-x -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9') unless exists $OPT{'a'}; +($OPT{'a2'} = $OPT{'a'} ) =~ s/\%0/\%0.bat/g; $OPT{'s'} = '.pl' unless exists $OPT{'s'}; $OPT{'s'} = ($OPT{'s'} =~ m|^/([^/]*)| ? $1 : "\Q$OPT{'s'}\E"); (my $head = <<EOT) =~ s/^\t//gm; \@rem = '--*-Perl-*-- \@echo off + if not exist \%0.bat goto over + perl $OPT{'a2'} + goto endofperl + :over perl $OPT{'a'} goto endofperl \@rem '; |