[Bps-public-commit] r12521 - in Shipwright/trunk: lib/Shipwright/Script share/bin

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun May 18 11:57:39 EDT 2008


Author: sunnavy
Date: Sun May 18 11:57:39 2008
New Revision: 12521

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Script/Build.pm
   Shipwright/trunk/share/bin/shipwright-builder

Log:
 r12588 at sunnavys-mb:  sunnavy | 2008-05-18 23:53:57 +0800
 support relative install-base arg


Modified: Shipwright/trunk/lib/Shipwright/Script/Build.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Build.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Build.pm	Sun May 18 11:57:39 2008
@@ -11,6 +11,7 @@
 );
 
 use Shipwright;
+use Cwd 'abs_path';
 
 sub options {
     (
@@ -34,6 +35,12 @@
     $self->install_base($install_base)
       if $install_base && !$self->install_base;
 
+    if ( $self->install_base ) {
+
+        # convert relative path to be absolute
+        $self->install_base( abs_path( $self->install_base ) );
+    }
+
     unless ( $self->name ) {
         if ( $self->repository =~ m{([-.\w]+)/([.\d]+)$} ) {
             $self->name("$1-$2");

Modified: Shipwright/trunk/share/bin/shipwright-builder
==============================================================================
--- Shipwright/trunk/share/bin/shipwright-builder	(original)
+++ Shipwright/trunk/share/bin/shipwright-builder	Sun May 18 11:57:39 2008
@@ -8,7 +8,7 @@
 use File::Find qw/find/;
 use Config;
 use Getopt::Long;
-use Cwd;
+use Cwd qw/getcwd abs_path/;
 use inc::YAML::Tiny;
 
 my $build_base = getcwd;
@@ -72,6 +72,10 @@
     map { $_ => 1 } split /\s*,\s*/, $args{flags} || ''
 };
 
+if ( $args{'install-base'} ) {
+    $args{'install-base'} = abs_path( $args{'install-base'} );
+}
+
 # YAML::Tiny objects are array based.
 my $order =
   ( YAML::Tiny->read( File::Spec->catfile( 'shipwright', 'order.yml' ) ) )->[0];



More information about the Bps-public-commit mailing list