mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rbinstall.rb: skip symlinks
* tool/rbinstall.rb (install_recursive): skip symlinks, which are made by `make runnable'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1ff165c92b
commit
7d79f355fc
1 changed files with 3 additions and 1 deletions
|
@ -227,9 +227,11 @@ def install_recursive(srcdir, dest, options = {})
|
||||||
Dir.foreach(file) do |f|
|
Dir.foreach(file) do |f|
|
||||||
src = File.join(file, f)
|
src = File.join(file, f)
|
||||||
d = File.join(dest, dir = src[subpath])
|
d = File.join(dest, dir = src[subpath])
|
||||||
stat = File.stat(src) rescue next
|
stat = File.lstat(src) rescue next
|
||||||
if stat.directory?
|
if stat.directory?
|
||||||
files << [src, d, true] if /\A\./ !~ f and !prune[dir]
|
files << [src, d, true] if /\A\./ !~ f and !prune[dir]
|
||||||
|
elsif stat.symlink?
|
||||||
|
# skip
|
||||||
else
|
else
|
||||||
files << [src, d, false] if File.fnmatch?(glob, f) and !skip[f]
|
files << [src, d, false] if File.fnmatch?(glob, f) and !skip[f]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue