aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/examples/brew-bottle.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/Library/Contributions/examples/brew-bottle.rb b/Library/Contributions/examples/brew-bottle.rb
index 4d91643e0..fc1faa4ed 100755
--- a/Library/Contributions/examples/brew-bottle.rb
+++ b/Library/Contributions/examples/brew-bottle.rb
@@ -1,5 +1,5 @@
# Builds binary brew package
-require 'cmd/install'
+require 'tab'
ARGV.each do|formula|
# Get the latest version
@@ -12,9 +12,16 @@ ARGV.each do|formula|
source = HOMEBREW_CELLAR + formula + version
filename = "#{formula}-#{version}-bottle.tar.gz"
- ohai "Bottling #{formula} #{version}..."
destination = Pathname.pwd
+
+ tab = Tab.for_keg source
+ if not tab.built_bottle
+ onoe "Formula not installed with '--build-bottle': #{formula}"
+ next
+ end
+
HOMEBREW_CELLAR.cd do
+ ohai "Bottling #{formula} #{version}..."
# Use gzip, faster to compress than bzip2, faster to uncompress than bzip2
# or an uncompressed tarball (and more bandwidth friendly).
safe_system 'tar', 'czf', destination/filename, "#{formula}/#{version}"