[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11908] trunk/blender/SConstruct: scons clean would throw an error if there was nothing to do.
Campbell Barton
cbarton at metavr.com
Fri Aug 31 21:17:22 CEST 2007
Revision: 11908
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11908
Author: campbellbarton
Date: 2007-08-31 21:17:22 +0200 (Fri, 31 Aug 2007)
Log Message:
-----------
scons clean would throw an error if there was nothing to do. print a message instead.
Modified Paths:
--------------
trunk/blender/SConstruct
Modified: trunk/blender/SConstruct
===================================================================
--- trunk/blender/SConstruct 2007-08-31 18:21:12 UTC (rev 11907)
+++ trunk/blender/SConstruct 2007-08-31 19:17:22 UTC (rev 11908)
@@ -241,13 +241,16 @@
do_clean = True
if not quickie and do_clean:
- print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
- dirs = os.listdir(B.root_build_dir)
- for dir in dirs:
- if os.path.isdir(B.root_build_dir + dir) == 1:
- print "clean dir %s"%(B.root_build_dir+dir)
- shutil.rmtree(B.root_build_dir+dir)
- print B.bc.OKGREEN+'...done'+B.bc.ENDC
+ if os.path.exists(B.root_build_dir):
+ print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
+ dirs = os.listdir(B.root_build_dir)
+ for dir in dirs:
+ if os.path.isdir(B.root_build_dir + dir) == 1:
+ print "clean dir %s"%(B.root_build_dir+dir)
+ shutil.rmtree(B.root_build_dir+dir)
+ print B.bc.OKGREEN+'...done'+B.bc.ENDC
+ else:
+ print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
Exit()
if not os.path.isdir ( B.root_build_dir):
More information about the Bf-blender-cvs
mailing list