[Bps-public-commit] r11162 - in Shipwright/trunk: share/bin
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sun Mar 23 15:49:27 EDT 2008
Author: sunnavy
Date: Sun Mar 23 15:49:27 2008
New Revision: 11162
Modified:
Shipwright/trunk/lib/Shipwright/Build.pm
Shipwright/trunk/share/bin/shipwright-builder
Log:
chdir to dists/foo first so we don't need to pass --source arg any more for build.pl
Modified: Shipwright/trunk/lib/Shipwright/Build.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Build.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Build.pm Sun Mar 23 15:49:27 2008
@@ -137,14 +137,15 @@
my $self = shift;
my $dir = shift;
- if ( -e File::Spec->catfile( 'scripts', $dir, 'build.pl' ) ) {
+ chdir File::Spec->catfile( 'dists', $dir );
+
+ if ( -e File::Spec->catfile( '..', '..', 'scripts', $dir, 'build.pl' ) ) {
$self->log->info(
"found build.pl for $dir, will install $dir using that");
Shipwright::Util->run(
[
$self->perl || $^X,
- File::Spec->catfile( 'scripts', $dir, 'build.pl' ),
- '--source' => File::Spec->catfile( 'dists', $dir ),
+ File::Spec->catfile( '..', '..', 'scripts', $dir, 'build.pl' ),
'--install-base' => $self->install_base,
'--flags' => join( ',', keys %{ $self->flags } ),
$self->skip_test ? '--skip-test' : (),
@@ -155,12 +156,11 @@
}
else {
- my @cmds = read_file( File::Spec->catfile( 'scripts', $dir, 'build' ) );
+ my @cmds = read_file(
+ File::Spec->catfile( '..', '..', 'scripts', $dir, 'build' ) );
chomp @cmds;
@cmds = map { $self->_substitute($_) } @cmds;
- chdir File::Spec->catfile( 'dists', $dir );
-
for (@cmds) {
my ( $type, $cmd );
next unless /\S/;
Modified: Shipwright/trunk/share/bin/shipwright-builder
==============================================================================
--- Shipwright/trunk/share/bin/shipwright-builder (original)
+++ Shipwright/trunk/share/bin/shipwright-builder Sun Mar 23 15:49:27 2008
@@ -212,27 +212,26 @@
sub install {
my $dir = shift;
+ chdir File::Spec->catfile( 'dists', $dir );
print "start to build and install $dir\n";
- if ( -e File::Spec->catfile( 'scripts', $dir, 'build.pl' ) ) {
+ if ( -e File::Spec->catfile( '..', '..', 'scripts', $dir, 'build.pl' ) ) {
print $log "found build.pl for $dir, will install $dir using that\n";
my $cmd = join ' ', $args{perl} || $^X,
- File::Spec->catfile( 'scripts', $dir, 'build.pl' ),
- '--source' => File::Spec->catfile( 'dists', $dir ),
+ File::Spec->catfile( '..', '..', 'scripts', $dir, 'build.pl' ),
'--install-base' => $args{'install-base'},
- '--flags' => join( ',', keys %{ $args{flags} } ),
+ '--flags' => join( ',', keys %{ $args{flags} } ),
$args{'skip-test'} ? '--skip-test' : (),
- $args{'force'} ? '--force' : (), $args{'clean'} ? '--clean' : ();
+ $args{'force'} ? '--force' : (),
+ $args{'clean'} ? '--clean' : ();
if ( system($cmd) ) {
print $log "build $dir with failure: $!\n";
die "build $dir with failure: $!\n";
}
}
else {
- my $cmds = cmds( File::Spec->catfile( 'scripts', $dir, 'build' ) );
-
- chdir File::Spec->catfile( 'dists', $dir );
+ my $cmds = cmds( File::Spec->catfile( '..', '..', 'scripts', $dir, 'build' ) );
for (@$cmds) {
my ( $type, $cmd ) = @$_;
@@ -404,20 +403,18 @@
my $dir = shift;
my $cmd;
+ chdir File::Spec->catfile( 'dists', $dir );
- if ( -e File::Spec->catfile( 'scripts', $dir, 'build.pl' ) ) {
+ if ( -e File::Spec->catfile( '..', '..', 'scripts', $dir, 'build.pl' ) ) {
print $log "found build.pl for $dir, will clean $dir using that\n";
$cmd = join ' ', $args{perl} || $^X,
- File::Spec->catfile( 'scripts', $dir, 'build.pl' ),
- '--source' => File::Spec->catfile( 'dists', $dir ),
+ File::Spec->catfile( '..', '..', 'scripts', $dir, 'build.pl' ),
'--install-base' => $args{'install-base'},
'--flags' => join( ',', keys %{ $args{flags} } ),
'--clean';
}
else {
- my $cmds = cmds( File::Spec->catfile( 'scripts', $dir, 'build' ) );
-
- chdir File::Spec->catfile( 'dists', $dir );
+ my $cmds = cmds( File::Spec->catfile( '..', '..', 'scripts', $dir, 'build' ) );
for (@$cmds) {
my ( $type, $c ) = @$_;
More information about the Bps-public-commit
mailing list