Copy dotfiles also for subdirectories

This commit is contained in:
fhemberger 2011-09-12 19:46:11 +02:00
parent 7c1c24f899
commit 5c275542c3

View File

@ -204,10 +204,10 @@ end
desc "copy dot files for deployment"
task :copydot do
exclusions = [".", "..", ".DS_Store"]
Dir["#{source_dir}/.*"].each do |file|
if !File.directory?(file) && !exclusions.include?(file)
cp(file, "#{public_dir}");
exclusions = [".", "..", ".DS_Store"]
Dir["#{source_dir}/**/.*"].each do |file|
if !File.directory?(file) && !exclusions.include?(file)
cp(file, file.gsub(/#{source_dir}/, "#{public_dir}"));
end
end
end