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
@ -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…
x
Reference in New Issue
Block a user