forked from szimek/juggernaut_plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.rb
18 lines (14 loc) · 845 Bytes
/
install.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'fileutils'
here = File.dirname(__FILE__)
there = defined?(RAILS_ROOT) ? RAILS_ROOT : "#{here}/../../.."
FileUtils.mkdir_p("#{there}/public/javascripts/juggernaut/")
FileUtils.mkdir_p("#{there}/public/juggernaut/")
puts "Installing Juggernaut..."
FileUtils.cp("#{here}/media/swfobject.js", "#{there}/public/javascripts/juggernaut/")
FileUtils.cp("#{here}/media/juggernaut.js", "#{there}/public/javascripts/juggernaut/")
FileUtils.cp("#{here}/media/juggernaut.swf", "#{there}/public/juggernaut/")
FileUtils.cp("#{here}/media/expressinstall.swf", "#{there}/public/juggernaut/")
FileUtils.cp("#{here}/media/juggernaut_hosts.yml", "#{there}/config/") unless File.exist?("#{there}/config/juggernaut_hosts.yml")
puts "Juggernaut has been successfully installed."
puts
puts "Please refer to the readme file #{File.expand_path(here)}/README"