Add an option "--root_url=" to bottle command.
Closes Homebrew/homebrew#29081. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
7609cf88c5
commit
176e5ab72c
@ -140,7 +140,7 @@ _brew_bottle ()
|
|||||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
--*)
|
--*)
|
||||||
__brewcomp "--merge --rb --write"
|
__brewcomp "--merge --rb --write --root_url="
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@ -9,6 +9,9 @@ require 'extend/pathname'
|
|||||||
|
|
||||||
BOTTLE_ERB = <<-EOS
|
BOTTLE_ERB = <<-EOS
|
||||||
bottle do
|
bottle do
|
||||||
|
<% if root_url != BottleSpecification.new.root_url %>
|
||||||
|
root_url "<%= root_url %>"
|
||||||
|
<% end %>
|
||||||
<% if prefix.to_s != "/usr/local" %>
|
<% if prefix.to_s != "/usr/local" %>
|
||||||
prefix "<%= prefix %>"
|
prefix "<%= prefix %>"
|
||||||
<% end %>
|
<% end %>
|
||||||
@ -181,7 +184,10 @@ module Homebrew extend self
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
root_url = ARGV.value("root_url")
|
||||||
|
|
||||||
bottle = BottleSpecification.new
|
bottle = BottleSpecification.new
|
||||||
|
bottle.root_url(root_url) if root_url
|
||||||
bottle.prefix HOMEBREW_PREFIX
|
bottle.prefix HOMEBREW_PREFIX
|
||||||
bottle.cellar relocatable ? :any : HOMEBREW_CELLAR
|
bottle.cellar relocatable ? :any : HOMEBREW_CELLAR
|
||||||
bottle.revision bottle_revision
|
bottle.revision bottle_revision
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user