Permalink
Browse files

correct rake task to not move directories, only move files

  • Loading branch information...
1 parent 457a7aa commit bc70e1b093ea938d71aeba9216931b74b70ceac7 @mjankowski mjankowski committed Sep 16, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/tasks/flutie.rake
View
@@ -3,7 +3,7 @@ require 'fileutils'
def copy_files(source_path, destination_path, directory)
source, destination = File.join(directory, source_path), File.join(Rails.root, destination_path)
FileUtils.mkdir_p(destination, :verbose => true) unless File.exist?(destination)
- FileUtils.cp_r(source, destination, :verbose => true)
+ FileUtils.cp_r(Dir.glob(source), destination, :verbose => true)
end
directory = File.dirname(__FILE__)
@@ -15,11 +15,11 @@ namespace :flutie do
# No copy is needed when asset pipelining is enabled
puts "Flutie stylesheets are provided via asset pipelining."
else
- # Copy the flutie stylesheets into rails_root/public/flutie
- copy_files("../../public/stylesheets", "/public/flutie", directory)
+ # Copy the flutie stylesheets into rails_root/public/stylesheets
+ copy_files("../../public/stylesheets/*", "/public/stylesheets", directory)
- # Copy the flutie sass stylesheets into rails_root/public/sass/flutie
- copy_files("../../app/assets/stylesheets", "/public/sass/flutie", directory)
+ # Copy the flutie sass stylesheets into rails_root/public/stylesheets/sass/flutie
+ copy_files("../../app/assets/stylesheets/*", "/public/stylesheets/sass/flutie", directory)
end
end
end

0 comments on commit bc70e1b

Please sign in to comment.