From cfb6b44bde0371e4cdcfeba19287205d90b4b595 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 10 Jun 2007 07:05:39 +0000 Subject: [PATCH] * instruby.rb (install_recursive): skip .svn directories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ instruby.rb | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c1341ed782..9f4218780c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Jun 10 16:07:10 2007 Nobuyoshi Nakada + + * instruby.rb (install_recursive): skip .svn directories. + Sun Jun 10 15:44:43 2007 Nobuyoshi Nakada * win32/Makefile.sub (config.status): rubyhdrdir was missing. diff --git a/instruby.rb b/instruby.rb index d813d0fdd7..04add9346e 100755 --- a/instruby.rb +++ b/instruby.rb @@ -126,7 +126,10 @@ def install_recursive(srcdir, dest, options = {}) noinst = options.delete(:no_install) subpath = srcdir.size..-1 Dir.glob("#{srcdir}/**/*", File::FNM_DOTMATCH) do |src| - next if /\A\.{1,2}\z|\A\.\#|\A\#.*\#\z|~\z/ =~ (base = File.basename(src)) + case base = File.basename(src) + when /\A\.{1,2}\z/, /\A\.\#/, /\A\#.*\#\z/, /~\z/, /\A\.svn\z/ + next + end if noinst if Array === noinst next if noinst.any? {|n| File.fnmatch?(n, base)}