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.
This commit is contained in:
parent
05c140e2e4
commit
69672ca965
@ -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?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user