Output bottles to CWD
Rationale: more typical.
This commit is contained in:
parent
f7bd98875b
commit
4f03ad225e
@ -1,9 +1,6 @@
|
|||||||
# Builds binary brew package
|
# Builds binary brew package
|
||||||
require 'cmd/install'
|
require 'cmd/install'
|
||||||
|
|
||||||
destination = HOMEBREW_PREFIX + "Bottles"
|
|
||||||
Dir.mkdir destination unless File.directory? destination
|
|
||||||
|
|
||||||
ARGV.each do|formula|
|
ARGV.each do|formula|
|
||||||
# Get the latest version
|
# Get the latest version
|
||||||
version = `brew list --versions #{formula}`.split.last
|
version = `brew list --versions #{formula}`.split.last
|
||||||
@ -16,12 +13,13 @@ 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}..."
|
ohai "Bottling #{formula} #{version}..."
|
||||||
|
destination = Pathname.pwd
|
||||||
HOMEBREW_CELLAR.cd do
|
HOMEBREW_CELLAR.cd do
|
||||||
# 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}"
|
||||||
sha1 = Pathname.new("#{destination}/#{filename}").sha1
|
puts "./#{filename}"
|
||||||
ohai "Bottled #{filename}"
|
puts "bottle 'https://downloads.sf.net/project/machomebrew/Bottles/#{filename}'"
|
||||||
ohai "SHA1 #{sha1}"
|
puts "bottle_sha1 '#{(destination/filename).sha1}'"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user