Compare cellar and prefix against constants
This commit is contained in:
parent
58464287bc
commit
7b1ca1d152
@ -12,12 +12,12 @@ BOTTLE_ERB = <<-EOS
|
|||||||
<% if root_url != BottleSpecification::DEFAULT_ROOT_URL %>
|
<% if root_url != BottleSpecification::DEFAULT_ROOT_URL %>
|
||||||
root_url "<%= root_url %>"
|
root_url "<%= root_url %>"
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if prefix.to_s != "/usr/local" %>
|
<% if prefix != BottleSpecification::DEFAULT_PREFIX %>
|
||||||
prefix "<%= prefix %>"
|
prefix "<%= prefix %>"
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if cellar.is_a? Symbol %>
|
<% if cellar.is_a? Symbol %>
|
||||||
cellar :<%= cellar %>
|
cellar :<%= cellar %>
|
||||||
<% elsif cellar.to_s != "/usr/local/Cellar" %>
|
<% elsif cellar != BottleSpecification::DEFAULT_CELLAR %>
|
||||||
cellar "<%= cellar %>"
|
cellar "<%= cellar %>"
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if revision > 0 %>
|
<% if revision > 0 %>
|
||||||
@ -186,8 +186,8 @@ module Homebrew
|
|||||||
|
|
||||||
bottle = BottleSpecification.new
|
bottle = BottleSpecification.new
|
||||||
bottle.root_url(root_url) if root_url
|
bottle.root_url(root_url) if root_url
|
||||||
bottle.prefix HOMEBREW_PREFIX
|
bottle.prefix HOMEBREW_PREFIX.to_s
|
||||||
bottle.cellar relocatable ? :any : HOMEBREW_CELLAR
|
bottle.cellar relocatable ? :any : HOMEBREW_CELLAR.to_s
|
||||||
bottle.revision bottle_revision
|
bottle.revision bottle_revision
|
||||||
bottle.sha1 bottle_path.sha1 => bottle_tag
|
bottle.sha1 bottle_path.sha1 => bottle_tag
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user