/[ascend]/trunk/models/SConscript
ViewVC logotype

Diff of /trunk/models/SConscript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 560 by johnpye, Sat Apr 29 08:53:04 2006 UTC revision 561 by johnpye, Thu May 4 07:35:43 2006 UTC
# Line 1  Line 1 
1  Import('env')  Import('env')
2    
3  import glob  import os, os.path
4    
5  a4c = glob.glob("*.a4c")  modelfiles = []
 a4s = glob.glob("*.a4s")  
 a4l = glob.glob("*.a4l")  
6    
7  env.Install(env['INSTALL_ROOT']+env['INSTALL_DATA']+"/ascend/models",a4c+a4l)  excludedirs = ['.svn','CVS']
8    excludefiles = ['Makefile.in','SConscript']
9    
10  subdirs = ['johnpye']  modeldir = env.Dir(".").abspath
11    
12  for subdir in subdirs:  cwd = os.getcwd()
13      files = glob.glob("johnpye/*.a4c")  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_DATA']+"/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      env.Install(env['INSTALL_ROOT']+env['INSTALL_DATA']+"/ascend/models/"+subdir,files)  #print "MODEL INSTALLED DIRS =",installeddirs
36    Return('installeddirs')

Legend:
Removed from v.560  
changed lines
  Added in v.561

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22