[Bps-public-commit] r13179 - in Shipwright/trunk: lib/Shipwright/Script

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Jun 11 14:40:22 EDT 2008


Author: sunnavy
Date: Wed Jun 11 14:40:19 2008
New Revision: 13179

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Script/Build.pm

Log:
 r13239 at sunnavys-mb:  sunnavy | 2008-06-12 02:38:07 +0800
 real --with support for build cmd


Modified: Shipwright/trunk/lib/Shipwright/Script/Build.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Build.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Build.pm	Wed Jun 11 14:40:19 2008
@@ -68,6 +68,18 @@
 
     $self->with( { map { split /=/ } split /\s*,\s*/, $self->with || '' } );
 
+    my %source;
+    for my $name ( keys %{ $self->with } ) {
+        my $shipwright = Shipwright->new(
+            name   => $name,
+            source => $self->with->{$name},
+            follow => 0,
+            map { $_ => $self->$_ }
+              qw/repository log_level log_file only_test perl/
+        );
+        $source{$name} = $shipwright->source->run;
+    }
+
     my $shipwright = Shipwright->new(
         map { $_ => $self->$_ }
           qw/repository log_level log_file skip skip_test
@@ -75,6 +87,13 @@
     );
 
     $shipwright->backend->export( target => $shipwright->build->build_base );
+
+    my $dists_dir = $shipwright->build->build_base;
+    for my $name ( keys %source ) {
+        my $dir = File::Spec->catfile( $dists_dir, 'dists', $name );
+        system("rm -rf $dir");
+        system("cp -r $source{$name} $dir");
+    }
     $shipwright->build->run();
 }
 



More information about the Bps-public-commit mailing list