Add GlobSubDir() function in building.py; Fix the import issue in wizard.py.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2320 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
10770dfe0d
commit
7cc241301a
|
@ -328,6 +328,19 @@ def GetVersion():
|
|||
|
||||
return '0.%d.%d' % (version, subversion)
|
||||
|
||||
def GlobSubDir(sub_dir, ext_name):
|
||||
import os
|
||||
import glob
|
||||
|
||||
list = os.listdir(sub_dir)
|
||||
src = glob.glob(os.path.join(sub_dir, ext_name))
|
||||
|
||||
for item in list:
|
||||
full_subdir = os.path.join(sub_dir, item)
|
||||
if os.path.isdir(full_subdir):
|
||||
src += GlobSubDir(full_subdir, ext_name)
|
||||
return src
|
||||
|
||||
def do_copy_file(src, dst):
|
||||
import shutil
|
||||
# check source file
|
||||
|
|
|
@ -27,6 +27,7 @@ Return('group')
|
|||
SConscript_bridge = '''# RT-Thread building script for bridge
|
||||
|
||||
import os
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
objs = []
|
||||
|
|
Loading…
Reference in New Issue