diff options
| author | Max Howell | 2012-03-25 11:07:30 +0100 |
|---|---|---|
| committer | Max Howell | 2012-03-25 11:07:30 +0100 |
| commit | 69672ca965150196f2cd277eca5958cd574aec61 (patch) | |
| tree | becf1408f975088675f8261ea71edec318ae1a89 /Library | |
| parent | 05c140e2e401714b4575998b6437332e3b56ed38 (diff) | |
| download | brew-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')
| -rw-r--r-- | Library/Homebrew/keg.rb | 2 |
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? |
