[Bps-public-commit] r11112 - Shipwright/trunk/share/bin

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Mar 19 01:34:44 EDT 2008


Author: sunnavy
Date: Wed Mar 19 01:34:44 2008
New Revision: 11112

Modified:
   Shipwright/trunk/share/bin/shipwright-builder

Log:
treat $args{skip} as hashref instead of arrayref: be consistent with build cmd

Modified: Shipwright/trunk/share/bin/shipwright-builder
==============================================================================
--- Shipwright/trunk/share/bin/shipwright-builder	(original)
+++ Shipwright/trunk/share/bin/shipwright-builder	Wed Mar 19 01:34:44 2008
@@ -59,7 +59,7 @@
 }
 
 
-$args{skip} = [ split /,\s*/, $args{skip} || '' ];
+$args{skip} = { map { $_ => 1 } split /,\s*/, $args{skip} || '' };
 
 # YAML::Tiny objects are array based.
 my $order =
@@ -79,7 +79,7 @@
     $args{'install-base'} = get_install_base() unless $args{'install-base'};
 
     for my $dist (@$order) {
-        unless ( grep { $dist eq $_ } @{ $args{skip} } ) {
+        unless ( $args{skip}{$dist} ) {
             clean($dist);
         }
         chdir $build_base;
@@ -118,7 +118,7 @@
 
     unless ( $args{perl} && -e $args{perl} ) {
         if ( ( grep { $_ eq 'perl' } @$order )
-            && !( grep { $_ eq 'perl' } @{ $args{skip} } ) )
+            && ! $args{skip}{perl} )
         {
             $args{perl} =
               File::Spec->catfile( $args{'install-base'}, 'bin', 'perl' );
@@ -170,7 +170,7 @@
         'shipwright-utility' );
 
     for my $dist (@$order) {
-        unless ( grep { $dist eq $_ } @{ $args{skip} } ) {
+        unless ( $args{skip}{$dist} ) {
             install($dist);
         }
         chdir $build_base;
@@ -260,7 +260,7 @@
     # then link to it, else link to the normal one
         if (   $type
             && grep( { $_ eq $type } @$order )
-            && !( grep { $_ eq $type } @{ $args{skip} } ) 
+            && ! $args{skip}{$type}
             && -e File::Spec->catfile( '..', 'etc', "shipwright-$type-wrapper" )
           )
         {



More information about the Bps-public-commit mailing list