开发者

Excluding .svn directories in Rake cp_r

I'm writing a rakefile using Albacore for my .NET stuf开发者_StackOverflow社区f, and I'm trying to figure out the easiest way to copy a project to another directory (artifacts) while excluding the .svn directories in its subdirectories.

Suggestions? I'm running into a wall here.


I know i'm late the game, here... but it's pretty simple with ruby:

FileUtils.cp(FileList["**/*"].exclude(".svn"), "some/destination/folder")

the FileUtils class mimics a bash shell's file utilities, so "mv" is "move" and "cp" is "copy".

The FileList object is built into Rake and is an easy way to create an array of files based on globs and other search parameters. the .exclude method of the FileList will exclude the files that match the pattern stated.


Use XCOPY /EXCLUDE. For example

XCOPY <src> <dest> /EXCLUDE:svn.txt

svn.txt contains \.svn


Wouldn't be svn export to the other directory an option?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜