[Bps-public-commit] r16808 - in Shipwright/trunk: lib/Shipwright/Backend

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Nov 11 01:43:03 EST 2008


Author: sunnavy
Date: Tue Nov 11 01:43:02 2008
New Revision: 16808

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Backend/Base.pm

Log:
 r17692 at sunnavys-mb:  sunnavy | 2008-11-11 14:39:43 +0800
 Shipwright should set 0644 permission for yml files explicitly.


Modified: Shipwright/trunk/lib/Shipwright/Backend/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Backend/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Backend/Base.pm	Tue Nov 11 01:43:02 2008
@@ -68,6 +68,15 @@
     copy( Module::Info->new_from_module('YAML::Tiny')->file, $yaml_tiny_path )
       or confess "copy YAML/Tiny.pm failed: $!";
 
+    # set proper permissions for yml under /shipwright/
+    my $sw_dir = catdir( $dir, 'shipwright' );
+    my $sw_dh;
+    opendir $sw_dh, $sw_dir or die "can't opendir $sw_dir: $!";
+    for my $yml ( grep { /.yml$/ } readdir $sw_dh ) {
+        chmod 0644, catfile( $dir, 'shipwright', $yml ); ## no critic
+    }
+    closedir $sw_dh;
+
     # share_root can't keep empty dirs, we have to create them manually
     for (qw/scripts t sources/) {
         mkdir catdir( $dir, $_ );



More information about the Bps-public-commit mailing list