mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
8d488264b5
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
30 lines
747 B
Ruby
30 lines
747 B
Ruby
require 'rbconfig'
|
|
require 'find'
|
|
require 'ftools'
|
|
|
|
include Config
|
|
|
|
# this was adapted from rdoc's install.rb by ways of Log4r
|
|
|
|
$sitedir = CONFIG["sitelibdir"]
|
|
unless $sitedir
|
|
version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
|
|
$libdir = File.join(CONFIG["libdir"], "ruby", version)
|
|
$sitedir = $:.find {|x| x =~ /site_ruby/ }
|
|
if !$sitedir
|
|
$sitedir = File.join($libdir, "site_ruby")
|
|
elsif $sitedir !~ Regexp.quote(version)
|
|
$sitedir = File.join($sitedir, version)
|
|
end
|
|
end
|
|
|
|
# the acual gruntwork
|
|
Dir.chdir("lib")
|
|
|
|
Find.find("action_mailer", "action_mailer.rb") { |f|
|
|
if f[-3..-1] == ".rb"
|
|
File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true)
|
|
else
|
|
File::makedirs(File.join($sitedir, *f.split(/\//)))
|
|
end
|
|
}
|