From 1798bd591c7c7462c025646bd2c7da406ff998f5 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Fri, 9 May 2014 17:38:12 +0900 Subject: Add an option "--root_url=" to bottle command. Closes #29081. Signed-off-by: Adam Vandenberg --- Library/Contributions/brew_bash_completion.sh | 2 +- Library/Homebrew/cmd/bottle.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index b69dbdd07..61c81361f 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -140,7 +140,7 @@ _brew_bottle () local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) - __brewcomp "--merge --rb --write" + __brewcomp "--merge --rb --write --root_url=" return ;; esac diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 71e12af38..42b1daba6 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -9,6 +9,9 @@ require 'extend/pathname' BOTTLE_ERB = <<-EOS bottle do + <% if root_url != BottleSpecification.new.root_url %> + root_url "<%= root_url %>" + <% end %> <% if prefix.to_s != "/usr/local" %> prefix "<%= prefix %>" <% end %> @@ -181,7 +184,10 @@ module Homebrew extend self end end + root_url = ARGV.value("root_url") + bottle = BottleSpecification.new + bottle.root_url(root_url) if root_url bottle.prefix HOMEBREW_PREFIX bottle.cellar relocatable ? :any : HOMEBREW_CELLAR bottle.revision bottle_revision -- cgit v1.2.3