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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue May 13 08:17:08 EDT 2008


Author: sunnavy
Date: Tue May 13 08:17:08 2008
New Revision: 12290

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

Log:
 r12303 at sunnavys-mb:  sunnavy | 2008-05-13 17:17:38 +0800
 set a need_clean flag to automatically clean if needed


Modified: Shipwright/trunk/share/bin/shipwright-builder
==============================================================================
--- Shipwright/trunk/share/bin/shipwright-builder	(original)
+++ Shipwright/trunk/share/bin/shipwright-builder	Tue May 13 08:17:08 2008
@@ -100,12 +100,25 @@
         }
         chdir $build_base;
     }
+
+    unlink '__need_clean';
 }
 else {
 
     # for install
     open $log, '>', 'build.log' or die $!;
 
+    if ( -e '__need_clean' ) {
+        print "seems it has been built before, need to clean first\n";
+        print $log "seems it has been built before, need to clean first\n";
+        system("$0 --clean") && die "clean failed: $!";
+
+    }
+
+    # set clean flag again
+    open my $tmp_fh, '>', '__need_clean' or die $!;
+    close $tmp_fh;
+
     require CPAN;
 
     # don't bother people no CPAN::Config since it's not a problem



More information about the Bps-public-commit mailing list