pull: tap if necessary.

This commit is contained in:
Mike McQuaid 2014-02-17 19:10:15 +00:00
parent 7bdaa7ffe1
commit 52f3c3b9e3

View File

@ -30,8 +30,11 @@ ARGV.named.each do|arg|
url = url_match[0]
end
if tap url
Dir.chdir HOMEBREW_REPOSITORY/"Library/Taps/#{url_match[1].downcase}-#{tap url}"
if tap_name = tap(url)
user = url_match[1].downcase
tap_dir = HOMEBREW_REPOSITORY/"Library/Taps/#{user}-#{tap_name}"
safe_system "brew", "tap", "#{user}/#{tap_name}" unless tap_dir.exist?
Dir.chdir tap_dir
else
Dir.chdir HOMEBREW_REPOSITORY
end