diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-09-03 11:58:53 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-09-03 11:58:53 -0400 |
commit | cbc4f28938fec3348c2a009b763587590d513198 (patch) | |
tree | de9bbcdac2f593dd988afc524cd68dcb06bf5b63 /buildscripts/utils.py | |
parent | 25eb3f0c37cfc4e736bc47b25c47d4b22c6a7175 (diff) | |
download | mongo-cbc4f28938fec3348c2a009b763587590d513198.tar.gz |
some cleaning
Diffstat (limited to 'buildscripts/utils.py')
-rw-r--r-- | buildscripts/utils.py | 17 |
1 files changed, 17 insertions, 0 deletions
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 |