1 |
Import('env') |
2 |
|
3 |
import os, os.path |
4 |
|
5 |
modelfiles = [] |
6 |
|
7 |
excludedirs = ['.svn','CVS'] |
8 |
excludefiles = ['Makefile.in','SConscript','update-Makefile.pl'] |
9 |
|
10 |
modeldir = env.Dir(".").abspath |
11 |
|
12 |
cwd = os.getcwd() |
13 |
os.chdir(modeldir) |
14 |
for root,dirs,files in os.walk("."): |
15 |
for d in dirs: |
16 |
if d in excludedirs: |
17 |
dirs.remove(d) |
18 |
for f in files: |
19 |
if f in excludefiles: |
20 |
continue |
21 |
modelfiles.append( os.path.normpath(os.path.join(root,f)) ) |
22 |
os.chdir(cwd) |
23 |
|
24 |
modelsroot = env['INSTALL_ROOT']+env['INSTALL_SHARE']+"/ascend/models" |
25 |
|
26 |
installeddirs = [] |
27 |
|
28 |
for f in modelfiles: |
29 |
head,tail = os.path.split(f) |
30 |
targetdir = os.path.join(modelsroot,head) |
31 |
if not targetdir in installeddirs: |
32 |
installeddirs.append(targetdir) |
33 |
env.Install(targetdir,f) |
34 |
|
35 |
#print "MODEL INSTALLED DIRS =",installeddirs |
36 |
Return('installeddirs') |