aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMax Howell2012-03-25 11:07:30 +0100
committerMax Howell2012-03-25 11:07:30 +0100
commit69672ca965150196f2cd277eca5958cd574aec61 (patch)
treebecf1408f975088675f8261ea71edec318ae1a89 /Library/Homebrew
parent05c140e2e401714b4575998b6437332e3b56ed38 (diff)
downloadbrew-69672ca965150196f2cd277eca5958cd574aec61.tar.bz2
Speed-up brew-unlink under certain conditions
This massively speeds up upgrades for certain formula, ie. formula with lots of files that aren't in the directories we link. I found upgrading android took ages before the un-tar step and it was indeed for this reason.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/keg.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index c3a5443f1..b7914224e 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -29,7 +29,7 @@ class Keg < Pathname
def unlink
n=0
- Pathname.new(self).find do |src|
+ %w[bin etc lib include sbin share var].map{ |d| self/d }.each do |src|
next if src == self
dst=HOMEBREW_PREFIX+src.relative_path_from(self)
next unless dst.symlink?