[Scons-users] Copying and merging directories

William Deegan bill at baddogconsulting.com
Sun Sep 9 00:18:49 EDT 2012

On Sep 8, 2012, at 5:30 PM, Peter Steele <pwsteele at gmail.com> wrote:

> I have a Sconscript that looks this like:


> FROM_DIR = "/mysrcdir/data"

> TO_DIR = “/mydstdir"


> env.Alias('copy', env.Command('copy', [], Copy(TO_DIR, FROM_DIR)))


> This will fail if the directory /mydstdir already exists, which in my case it definitely will exist. The copy operation is intended to copy additional files into this target directory directory, merging the files copied from /mysrcdir/data with the files already present in /mydstdir. Beyond writing explicit Python code to do it, how can I get scons to not complain if the destination already when a Copy operation is done?

Use env.Install and env.Glob to find the files.
Don't copy directories as they automatically depend on their included files, but won't be updated if the directory content changes.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20120908/7b440070/attachment.htm>

More information about the Scons-users mailing list