mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Cache destination dir.
It is not necessary to strip the `destdir` prefix every iteration, when it can be done just once.
This commit is contained in:
parent
b8a8fdba63
commit
9d6d531527
Notes:
git
2020-02-26 11:05:18 +09:00
1 changed files with 2 additions and 1 deletions
|
@ -722,9 +722,10 @@ module RbInstall
|
|||
return if @src_dir == destination_dir
|
||||
File.chmod(0700, destination_dir)
|
||||
mode = pattern == File.join(spec.bindir, '*') ? prog_mode : data_mode
|
||||
destdir = without_destdir(destination_dir)
|
||||
spec.files.each do |f|
|
||||
src = File.join(@src_dir, f)
|
||||
dest = File.join(without_destdir(destination_dir), f)
|
||||
dest = File.join(destdir, f)
|
||||
makedirs(dest[/.*(?=\/)/m])
|
||||
install src, dest, :mode => mode
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue