summaryrefslogtreecommitdiff
path: root/tool/rbuninstall.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-08 05:24:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-08 05:24:23 +0000
commit5ebffacf17077de98fc99ee63daa617627e249cf (patch)
treee16eb245aa282d8c2cb306b820b88f1e0baf6ba4 /tool/rbuninstall.rb
parent7d183dab15665d34ad982348c3205c85b28017b5 (diff)
* tool/rbuninstall.rb: remove symlinks.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/rbuninstall.rb')
-rwxr-xr-xtool/rbuninstall.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/tool/rbuninstall.rb b/tool/rbuninstall.rb
index 2d16122..f682279 100755
--- a/tool/rbuninstall.rb
+++ b/tool/rbuninstall.rb
@@ -39,7 +39,12 @@ END {
end
$dirs.reverse_each do |dir|
begin
- Dir.rmdir(dir)
+ begin
+ Dir.rmdir(dir)
+ rescue Errno::ENOTDIR
+ raise unless File.symlink?(dir)
+ File.unlink(dir)
+ end
rescue Errno::ENOENT, Errno::ENOTEMPTY
rescue
status = false