public
Description: FiveRuns TuneUp Panel
Homepage: http://fiveruns.org
Clone URL: git://github.com/fiveruns/fiveruns_tuneup.git
fiveruns_tuneup / install.rb
100644 13 lines (13 sloc) 0.465 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
installed = false
Dir[File.dirname(__FILE__) << "/assets/*"].each do |location|
  directory = File.basename(location)
  destination = File.join(RAILS_ROOT, 'public', directory, 'tuneup')
  FileUtils.rm_rf(destination) rescue nil
  FileUtils.mkdir_p(destination)
  Dir[File.join(location, '*')].each do |file|
    new_filename = File.join(destination, File.basename(file))
    unless File.exists?(new_filename)
      FileUtils.cp file, new_filename
    end
  end
end