From 254cdd35d62b968fdbe4905eec863d84c6a8a98d Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sat, 10 Dec 2011 14:42:31 +0100 Subject: [PATCH] :copydot ignores thumbnail files starting with '._' --- Rakefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index ebc386e..0275b68 100644 --- a/Rakefile +++ b/Rakefile @@ -217,11 +217,8 @@ end desc "copy dot files for deployment" task :copydot, :source, :dest do |t, args| - exclusions = [".", "..", ".DS_Store"] - Dir["#{args.source}/**/.*"].each do |file| - if !File.directory?(file) && !exclusions.include?(File.basename(file)) - cp(file, file.gsub(/#{args.source}/, "#{args.dest}")); - end + FileList["#{args.source}/**/.*"].exclude("**/.", "**/..", "**/.DS_Store", "**/._*").each do |file| + cp_r file, file.gsub(/#{args.source}/, "#{args.dest}") unless File.directory?(file) end end