Skip to content

Commit

Permalink
correct rake task to not move directories, only move files
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski committed Sep 16, 2011
1 parent 457a7aa commit bc70e1b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/tasks/flutie.rake
Expand Up @@ -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__)
Expand All @@ -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.