[Bps-public-commit] r10707 - bpsbuilder/Shipwright/lib/Shipwright
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sun Feb 3 20:15:35 EST 2008
Author: sunnavy
Date: Sun Feb 3 20:15:33 2008
New Revision: 10707
Modified:
bpsbuilder/Shipwright/lib/Shipwright/Build.pm
Log:
catch up with build script for Build.pm
Modified: bpsbuilder/Shipwright/lib/Shipwright/Build.pm
==============================================================================
--- bpsbuilder/Shipwright/lib/Shipwright/Build.pm (original)
+++ bpsbuilder/Shipwright/lib/Shipwright/Build.pm Sun Feb 3 20:15:33 2008
@@ -178,15 +178,18 @@
open my $fh, '<', $file or die "can't open $file: $!";
my $shebang = <$fh>;
my $base = quotemeta $self->install_base;
- my $perl = quotemeta $self->perl;
+ my $perl = quotemeta $self->perl || $^X;
if ( $shebang =~ m{$perl} )
{
$type = 'perl';
}
- elsif ( $shebang =~ m{$base(?:/|\\)(?:s?bin|libexec)(?:/|\\)(\w+)} )
+ elsif (
+ $shebang =~ m{$base(?:/|\\)(?:s?bin|libexec)(?:/|\\)(\w+)
+ |\benv\s+(\w+)}x
+ )
{
- $type = $1;
+ $type = $1 || $2;
}
}
@@ -227,9 +230,11 @@
return unless $text;
- my $perl = $self->perl;
+ my $perl = $self->perl || $^X;
+ my $perl_archname = `$perl -MConfig -e 'print my \$Config{archname}'`;
my $install_base = $self->install_base;
$text =~ s/%%PERL%%/$perl/g;
+ $text =~ s/%%PERL_ARCHNAME%%/$perl_archname/g;
$text =~ s/%%INSTALL_BASE%%/$install_base/g;
return $text;
}
More information about the Bps-public-commit
mailing list