From c4752b260b5495e54738234b08e5b9befc8ea46c Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 12 Mar 2014 20:18:55 +0800 Subject: [PATCH] Updates tools/travis-scripts/generate-template-files.py. --- tools/travis-scripts/generate-template-files.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/travis-scripts/generate-template-files.py b/tools/travis-scripts/generate-template-files.py index 36b70a02c7..b0b5fbb159 100755 --- a/tools/travis-scripts/generate-template-files.py +++ b/tools/travis-scripts/generate-template-files.py @@ -43,7 +43,7 @@ class CocosFileList: self.fileList_com=[] self.fileList_lua=[] - self.luaPath ="cocos/scripting/lua-bindings" + self.luaPath = ["cocos/scripting/lua-bindings", "external/lua"] def readIngoreFile(self, fileName): """ @@ -88,7 +88,12 @@ class CocosFileList: self.__bInclude(item) or self.__bInclude("%s/" %item) ): - if relativePath.upper().find(self.luaPath.upper())==0: + foundLuaModule = False + for luaPath in self.luaPath: + if relativePath.upper().find(luaPath.upper()) == 0: + foundLuaModule = True + break + if foundLuaModule: self.fileList_lua.append("%s/" %relativePath) else: self.fileList_com.append("%s/" %relativePath) @@ -112,7 +117,12 @@ class CocosFileList: ): continue # print(relativePath) - if relativePath.upper().find(self.luaPath.upper())==0: + foundLuaModule = False + for luaPath in self.luaPath: + if relativePath.upper().find(luaPath.upper()) == 0: + foundLuaModule = True + break + if foundLuaModule: self.fileList_lua.append(relativePath) else: self.fileList_com.append(relativePath)