summaryrefslogtreecommitdiffstats
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
commitfd5dcfec379f115e0d9249d5ec9460c2a94882b4 (patch)
tree614dac35eb03617d6a45f4209d73e14b8f4be0cf /instruby.rb
parent5269d9baaabcf2f60182f2148892347bfd951a8c (diff)
downloadruby-fd5dcfec379f115e0d9249d5ec9460c2a94882b4.tar.gz
ruby-fd5dcfec379f115e0d9249d5ec9460c2a94882b4.tar.xz
ruby-fd5dcfec379f115e0d9249d5ec9460c2a94882b4.zip
* instruby.rb: should not depend on a library which does not exist
in 1.8. git-svn-id: http://svn.ruby-lang.org/repos/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 4edfe6e03..1dc1a847d 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