Import('env') env.SConscript(['johnpye/SConscript'],['env']) import os, os.path modelfiles = [] excludedirs = ['.svn','CVS'] excludefiles = ['Makefile.in','SConscript','update-Makefile.pl'] modeldir = env.Dir(".").abspath cwd = os.getcwd() os.chdir(modeldir) for root,dirs,files in os.walk("."): for d in dirs: if d in excludedirs: dirs.remove(d) for f in files: if f in excludefiles: continue modelfiles.append( os.path.normpath(os.path.join(root,f)) ) os.chdir(cwd) modelsroot = env['INSTALL_ROOT']+env['INSTALL_MODELS'] installeddirs = [] for f in modelfiles: head,tail = os.path.split(f) targetdir = os.path.join(modelsroot,head) if not targetdir in installeddirs: installeddirs.append(targetdir) env.InstallShared(targetdir,f) #print "MODEL INSTALLED DIRS =",installeddirs Return('installeddirs') # vim: set syntax=python: