summaryrefslogtreecommitdiff
path: root/instruby.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-08 08:32:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-08 08:32:17 +0000
commit20f786810655ef7ad130f58f8593d3214d146c4b (patch)
tree614dac35eb03617d6a45f4209d73e14b8f4be0cf /instruby.rb
parent0dd41d0d78ff19d23e5c8e7b664855aa8bbe1e95 (diff)
* instruby.rb: should not depend on a library which does not exist
in 1.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rwxr-xr-xinstruby.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/instruby.rb b/instruby.rb
index 4edfe6e032..1dc1a847d3 100755
--- a/instruby.rb
+++ b/instruby.rb
@@ -284,8 +284,7 @@ install?(:doc, :rdoc) do
if $rdocdir
puts "installing rdoc"
- ridatadir = RDoc::RI::Paths::SYSDIR
- Config.expand(ridatadir)
+ ridatadir = File.join(CONFIG['datadir'], "ri", CONFIG['ruby_version'], "system")
makedirs [ridatadir]
install_recursive($rdocdir, ridatadir, :mode => $data_mode)
end
@@ -342,10 +341,10 @@ __END__
:endofruby
EOF
when "cmd"
- "#{<<EOH}#{shebang}#{body}"
+ "#{<<"/EOH"}#{shebang}#{body}"
@"%~dp0#{ruby_install_name}" -x "%~f0" %*
@exit /b %ERRORLEVEL%
-EOH
+/EOH
else
shebang + body
end
@@ -411,7 +410,11 @@ end
install?(:local, :comm, :gem) do
puts "creating default gem directories"
- directories = %w[cache doc gems specifications]
+ directories = open(File.join(srcdir, "lib/rubygems.rb")) do |f|
+ if f.grep(/^\s*DIRECTORIES\s*=\s*%w\[(.*?)\]/)
+ break $1.split
+ end
+ end
gpath = CONFIG["sitelibdir"].sub(%r'/site_ruby/(?=[^/]+)', '/gems/')
makedirs directories.collect {|dir| File.join(gpath, dir)}
end