summaryrefslogtreecommitdiff
path: root/tool/rbinstall.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-16 04:35:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-16 04:35:18 +0000
commit51e7d0efb2ee98b1d963a32961904aee98437017 (patch)
tree2baee59640ffbf3dc0c7215921216d70182f44ee /tool/rbinstall.rb
parent9e322773561788bbee3b7daaefbb415ae4618b45 (diff)
rbinstall.rb: always make gem directories
* tool/rbinstall.rb (gem): always make gem directories regardless of zlib. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/rbinstall.rb')
-rwxr-xr-xtool/rbinstall.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 3ea7e7f..159144c 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -707,17 +707,17 @@ install?(:ext, :comm, :gem) do
end
install?(:ext, :comm, :gem) do
+ gem_dir = Gem.default_dir
+ directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+ prepare "bundle gems", gem_dir, directories
+ install_dir = with_destdir(gem_dir)
begin
require "zlib"
rescue LoadError
end
if defined?(Zlib)
- require 'pathname'
- gem_dir = Gem.default_dir
- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
- prepare "bundle gems", gem_dir, directories
options = {
- :install_dir => with_destdir(gem_dir),
+ :install_dir => install_dir,
:domain => :local,
:ignore_dependencies => true,
:dir_mode => $dir_mode,
@@ -726,14 +726,14 @@ install?(:ext, :comm, :gem) do
}
Dir.glob(srcdir+'/gems/*.gem').each do |gem|
Gem.install(gem, Gem::Requirement.default, options)
- gemname = Pathname(gem).basename
+ gemname = File.basename(gem)
puts "#{" "*30}#{gemname}"
end
# fix directory permissions
# TODO: Gem.install should accept :dir_mode option or something
- File.chmod($dir_mode, *Dir.glob(with_destdir(gem_dir)+"/**/"))
+ File.chmod($dir_mode, *Dir.glob(install_dir+"/**/"))
# fix .gemspec permissions
- File.chmod($data_mode, *Dir.glob(with_destdir(gem_dir)+"/specifications/*.gemspec"))
+ File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec"))
else
puts "skip installing bundle gems because of lacking zlib"
end