From 552dcdc7035d7114d47751d93630e37ae6d5bf24 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 7 Mar 2012 21:30:03 -0500 Subject: Move most bottle stuff to a bottles.rb file. --- Library/Homebrew/cmd/bottle.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 25160b5c6..4a1cd0f36 100755 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -1,17 +1,14 @@ require 'formula' +require 'bottles' require 'tab' module Homebrew extend self - def formula_bottle_name f - "#{f.name}-#{f.version}.#{MacOS.cat}.bottle.tar.gz" - end - def bottle_formula f return onoe "Formula not installed: #{f.name}" unless f.installed? - return onoe "Formula not installed with '--build-bottle': #{f.name}" unless Tab.for_formula(f).built_bottle + return onoe "Formula not installed with '--build-bottle': #{f.name}" unless built_bottle? f directory = Pathname.pwd - filename = formula_bottle_name f + filename = bottle_filename f HOMEBREW_CELLAR.cd do ohai "Bottling #{f.name} #{f.version}..." -- cgit v1.2.3