Don't bottle unless built with correct flag.
Closes Homebrew/homebrew#9350. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
8b762cd9b4
commit
38b4a06207
@ -1,5 +1,5 @@
|
|||||||
# Builds binary brew package
|
# Builds binary brew package
|
||||||
require 'cmd/install'
|
require 'tab'
|
||||||
|
|
||||||
ARGV.each do|formula|
|
ARGV.each do|formula|
|
||||||
# Get the latest version
|
# Get the latest version
|
||||||
@ -12,9 +12,16 @@ ARGV.each do|formula|
|
|||||||
|
|
||||||
source = HOMEBREW_CELLAR + formula + version
|
source = HOMEBREW_CELLAR + formula + version
|
||||||
filename = "#{formula}-#{version}-bottle.tar.gz"
|
filename = "#{formula}-#{version}-bottle.tar.gz"
|
||||||
ohai "Bottling #{formula} #{version}..."
|
|
||||||
destination = Pathname.pwd
|
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
|
HOMEBREW_CELLAR.cd do
|
||||||
|
ohai "Bottling #{formula} #{version}..."
|
||||||
# Use gzip, faster to compress than bzip2, faster to uncompress than bzip2
|
# Use gzip, faster to compress than bzip2, faster to uncompress than bzip2
|
||||||
# or an uncompressed tarball (and more bandwidth friendly).
|
# or an uncompressed tarball (and more bandwidth friendly).
|
||||||
safe_system 'tar', 'czf', destination/filename, "#{formula}/#{version}"
|
safe_system 'tar', 'czf', destination/filename, "#{formula}/#{version}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user