# File lib/buildr/core/filter.rb, line 174 def run copy_map = copy_map() mkpath target.to_s return false if copy_map.empty? copy_map.each do |path, source| dest = File.expand_path(path, target.to_s) if File.directory?(source) mkpath dest else mkpath File.dirname(dest) if @mapper.mapper_type mapped = @mapper.transform(File.open(source, 'rb') { |file| file.read }, path) File.open(dest, 'wb') { |file| file.write mapped } else # no mapping cp source, dest end end File.chmod(File.stat(source).mode | 0200, dest) end touch target.to_s true end