diff options
| author | Max Howell | 2012-03-25 11:07:30 +0100 |
|---|---|---|
| committer | Max Howell | 2012-03-25 11:07:30 +0100 |
| commit | f372dafd98d733b30df873bc2475673bcdae2527 (patch) | |
| tree | 69e16eb236dc39a3220a0ca3dc1edde570d42f42 | |
| parent | 130131524b857f67d943493a1f04b94143215d43 (diff) | |
| download | homebrew-f372dafd98d733b30df873bc2475673bcdae2527.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.
| -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? |
