Skip to content
This repository
Newer
Older
100644 30 lines (25 sloc) 0.747 kb
db045dbb » dhh
2004-11-24 Initial
1 require 'rbconfig'
2 require 'find'
3 require 'ftools'
4
5 include Config
6
7 # this was adapted from rdoc's install.rb by ways of Log4r
8
9 $sitedir = CONFIG["sitelibdir"]
10 unless $sitedir
11 version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
12 $libdir = File.join(CONFIG["libdir"], "ruby", version)
13 $sitedir = $:.find {|x| x =~ /site_ruby/ }
14 if !$sitedir
15 $sitedir = File.join($libdir, "site_ruby")
16 elsif $sitedir !~ Regexp.quote(version)
17 $sitedir = File.join($sitedir, version)
18 end
19 end
20
21 # the acual gruntwork
22 Dir.chdir("lib")
8d488264 » dhh
2005-04-02 Added install.rbs for all frameworks and made all of them generic eno…
23
24 Find.find("active_record", "active_record.rb") { |f|
25 if f[-3..-1] == ".rb"
26 File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true)
27 else
28 File::makedirs(File.join($sitedir, *f.split(/\//)))
29 end
db045dbb » dhh
2004-11-24 Initial
30 }
Something went wrong with that request. Please try again.