[Bps-public-commit] Shipwright branch, master, updated. 524927ca66b5a86fda3319172aaf001f05cf6ca8
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Aug 5 22:57:27 EDT 2009
The branch, master has been updated
via 524927ca66b5a86fda3319172aaf001f05cf6ca8 (commit)
from 43376f38c063be77fbeb351e6d4db8fe5f57f478 (commit)
Summary of changes:
lib/Shipwright/Source.pm | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 524927ca66b5a86fda3319172aaf001f05cf6ca8
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Aug 6 10:57:18 2009 +0800
let's keep downloads too
diff --git a/lib/Shipwright/Source.pm b/lib/Shipwright/Source.pm
index 8769ccc..3bc6053 100644
--- a/lib/Shipwright/Source.pm
+++ b/lib/Shipwright/Source.pm
@@ -8,6 +8,7 @@ use Hash::Merge qw/merge/;
use File::Temp qw/tempdir/;
use File::Spec::Functions qw/catfile catdir/;
use Shipwright::Util;
+use File::Path qw/make_path/;
Hash::Merge::set_behavior('RIGHT_PRECEDENT');
@@ -16,7 +17,8 @@ our %DEFAULT = ( follow => 1, );
$DEFAULT{directory} =
tempdir( 'shipwright_source_XXXXXX', CLEANUP => 1, TMPDIR => 1 );
$DEFAULT{scripts_directory} = catdir( $DEFAULT{directory}, '__scripts' );
-$DEFAULT{download_directory} = catdir( $DEFAULT{directory}, '__download' );
+$DEFAULT{download_directory} =
+ catdir( Shipwright::Util->shipwright_user_root, 'downloads' );
$DEFAULT{map_path} = catfile( $DEFAULT{directory}, 'map.yml' );
$DEFAULT{url_path} = catfile( $DEFAULT{directory}, 'url.yml' );
$DEFAULT{version_path} = catfile( $DEFAULT{directory}, 'version.yml' );
@@ -48,7 +50,7 @@ sub new {
croak "need source arg" unless exists $args{source};
for my $dir (qw/directory download_directory scripts_directory/) {
- mkdir $args{$dir} unless -e $args{$dir};
+ make_path( $args{$dir} ) unless -e $args{$dir};
}
my $type = type( \$args{source} );
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list