Max Howell 4f03ad225e Output bottles to CWD
Rationale: more typical.
2011-08-25 02:32:41 +01:00

26 lines
827 B
Ruby
Executable File

# Builds binary brew package
require 'cmd/install'
ARGV.each do|formula|
# Get the latest version
version = `brew list --versions #{formula}`.split.last
if version.nil?
onoe "Formula not installed: #{formula}"
next
end
source = HOMEBREW_CELLAR + formula + version
filename = "#{formula}-#{version}-bottle.tar.gz"
ohai "Bottling #{formula} #{version}..."
destination = Pathname.pwd
HOMEBREW_CELLAR.cd do
# 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}"
puts "./#{filename}"
puts "bottle 'https://downloads.sf.net/project/machomebrew/Bottles/#{filename}'"
puts "bottle_sha1 '#{(destination/filename).sha1}'"
end
end