Edit

kc3-lang/angle/src/enumerate_files.py

Branch :

  • Show log

    Commit

  • Author : Geoff Lang
    Date : 2013-08-29 11:40:43
    Hash : d47e0fcc
    Message : Split the d3d9 and d3d11 backends into folders and updated the gyp file to use a python script to generate the file lists for the libGLESv2 and libEGL projects.

  • src/enumerate_files.py
  • import fnmatch
    import os
    import sys
    
    rootdirs = [ ]
    filetypes = [ ]
    
    foundTypesArg = False
    for i in range(1, len(sys.argv)):
        arg = sys.argv[i]
        if arg == "-types":
            foundTypesArg = True
            continue
        
        if foundTypesArg:
            filetypes.append(arg)
        else:
            rootdirs.append(arg)
    
    for rootdir in rootdirs:
        for root, dirnames, filenames in os.walk(rootdir):
            for file in filenames:
                for type in filetypes:
                    if fnmatch.fnmatchcase(file, type):
                        print os.path.join(root, file).replace("\\", "/")
                        break