From cbc4f28938fec3348c2a009b763587590d513198 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Fri, 3 Sep 2010 11:58:53 -0400 Subject: some cleaning --- buildscripts/utils.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'buildscripts/utils.py') diff --git a/buildscripts/utils.py b/buildscripts/utils.py index 640ac5dd986..8021d8779da 100644 --- a/buildscripts/utils.py +++ b/buildscripts/utils.py @@ -5,6 +5,23 @@ import time import os # various utilities that are handy +def getAllSourceFiles( arr=None , prefix="." ): + if arr is None: + arr = [] + + for x in os.listdir( prefix ): + if x.startswith( "." ) or x.startswith( "pcre-" ) or x.startswith( "32bit" ) or x.startswith( "mongodb-" ) or x.startswith("debian") or x.startswith( "mongo-cxx-driver" ): + continue + full = prefix + "/" + x + if os.path.isdir( full ) and not os.path.islink( full ): + getAllSourceFiles( arr , full ) + else: + if full.endswith( ".cpp" ) or full.endswith( ".h" ) or full.endswith( ".c" ): + arr.append( full ) + + return arr + + def getGitBranch(): if not os.path.exists( ".git" ): return None -- cgit v1.2.1