Skip to content
Browse files

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.
  • Loading branch information...
1 parent 1301315 commit f372dafd98d733b30df873bc2475673bcdae2527 @mxcl mxcl committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 Library/Homebrew/keg.rb
View
2 Library/Homebrew/keg.rb
@@ -29,7 +29,7 @@ def uninstall
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?

1 comment on commit f372daf

@jacknagel

Nice.

Please sign in to comment.
Something went wrong with that request. Please try again.