pull: use link_tap_formula method.
This commit is contained in:
parent
7926ea171c
commit
e50badf11c
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
require 'utils'
|
require 'utils'
|
||||||
require 'formula'
|
require 'formula'
|
||||||
|
require 'cmd/tap'
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
def tap arg
|
def tap arg
|
||||||
@ -92,9 +93,9 @@ module Homebrew
|
|||||||
pull_url url
|
pull_url url
|
||||||
|
|
||||||
changed_formulae = []
|
changed_formulae = []
|
||||||
|
changed_formulae_paths = []
|
||||||
|
|
||||||
if tap_dir
|
if tap_dir
|
||||||
safe_system "brew", "tap", "--repair", "--debug"
|
|
||||||
formula_dir = %w[Formula HomebrewFormula].find { |d| tap_dir.join(d).directory? } || ""
|
formula_dir = %w[Formula HomebrewFormula].find { |d| tap_dir.join(d).directory? } || ""
|
||||||
else
|
else
|
||||||
formula_dir = "Library/Formula"
|
formula_dir = "Library/Formula"
|
||||||
@ -104,7 +105,9 @@ module Homebrew
|
|||||||
"git", "diff-tree", "-r", "--name-only",
|
"git", "diff-tree", "-r", "--name-only",
|
||||||
"--diff-filter=AM", revision, "HEAD", "--", formula_dir
|
"--diff-filter=AM", revision, "HEAD", "--", formula_dir
|
||||||
).each_line do |line|
|
).each_line do |line|
|
||||||
name = File.basename(line.chomp, ".rb")
|
line = line.chomp
|
||||||
|
name = File.basename(line, ".rb")
|
||||||
|
changed_formulae_paths << Pathname.new("#{formula_dir}/#{line}")
|
||||||
|
|
||||||
begin
|
begin
|
||||||
changed_formulae << Formula[name]
|
changed_formulae << Formula[name]
|
||||||
@ -114,6 +117,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
link_tap_formula(changed_formulae_paths, false)
|
||||||
|
|
||||||
unless ARGV.include? '--bottle'
|
unless ARGV.include? '--bottle'
|
||||||
changed_formulae.each do |f|
|
changed_formulae.each do |f|
|
||||||
next unless f.bottle
|
next unless f.bottle
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user