7 # this was adapted from rdoc's install.rb by ways of Log4r
\r
9 $sitedir = CONFIG["sitelibdir"]
\r
11 version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
\r
12 $libdir = File.join(CONFIG["libdir"], "ruby", version)
\r
13 $sitedir = $:.find {|x| x =~ /site_ruby/ }
\r
15 $sitedir = File.join($libdir, "site_ruby")
\r
16 elsif $sitedir !~ Regexp.quote(version)
\r
17 $sitedir = File.join($sitedir, version)
\r
21 # the acual gruntwork
\r
24 Find.find("composite_primary_keys", "composite_primary_keys.rb") { |f|
\r
25 if f[-3..-1] == ".rb"
\r
26 File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true)
\r
28 File::makedirs(File.join($sitedir, *f.split(/\//)))
\r