[Bps-public-commit] r13715 - in Shipwright/trunk: share/bin

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Jul 1 11:45:34 EDT 2008


Author: sunnavy
Date: Tue Jul  1 11:45:34 2008
New Revision: 13715

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/share/bin/shipwright-builder

Log:
 r13987 at sunnavys-mb:  sunnavy | 2008-07-01 23:40:40 +0800
 back compatible change: sometimes there are no flags.yml or ktf.yml


Modified: Shipwright/trunk/share/bin/shipwright-builder
==============================================================================
--- Shipwright/trunk/share/bin/shipwright-builder	(original)
+++ Shipwright/trunk/share/bin/shipwright-builder	Tue Jul  1 11:45:34 2008
@@ -102,10 +102,24 @@
 # YAML::Tiny objects are array based.
 my $order =
   ( YAML::Tiny->read( File::Spec->catfile( 'shipwright', 'order.yml' ) ) )->[0];
-my $flags =
-  ( YAML::Tiny->read( File::Spec->catfile( 'shipwright', 'flags.yml' ) ) )->[0];
-my $ktf =
-  ( YAML::Tiny->read( File::Spec->catfile( 'shipwright', 'ktf.yml' ) ) )->[0];
+
+my ( $flags, $ktf );
+
+if ( -e File::Spec->catfile( 'shipwright', 'flags.yml' ) ) {
+    $flags =
+      ( YAML::Tiny->read( File::Spec->catfile( 'shipwright', 'flags.yml' ) ) )->[0];
+}
+else {
+    $flags = {};
+}
+
+if ( -e File::Spec->catfile( 'shipwright', 'ktf.yml' ) ) {
+    $ktf =
+      ( YAML::Tiny->read( File::Spec->catfile( 'shipwright', 'ktf.yml' ) ) )->[0];
+}
+else {
+    $ktf = {};
+}
 
 # fill not specified but mandatory flags
 if ( $flags->{__mandatory} ) {



More information about the Bps-public-commit mailing list