diff options
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/bottle.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 9f2c59767..87b380aa6 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -13,19 +13,21 @@ module Homebrew extend self return ofail "Formula not installed with '--build-bottle': #{f.name}" end - directory = Pathname.pwd - bottle_version = bottle_new_version f - filename = bottle_filename f, bottle_version + bottle_revision = bottle_new_revision f + filename = bottle_filename f, bottle_revision + bottle_path = Pathname.pwd/filename + sha1 = nil HOMEBREW_CELLAR.cd do ohai "Bottling #{f.name} #{f.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', directory/filename, "#{f.name}/#{f.version}" + safe_system 'tar', 'czf', bottle_path, "#{f.name}/#{f.version}" + sha1 = bottle_path.sha1 puts "./#{filename}" puts "bottle do" - puts " version #{bottle_version}" if bottle_version > 0 - puts " sha1 '#{(directory/filename).sha1}' => :#{MacOS.cat}" + puts " revision #{bottle_revision}" if bottle_revision > 0 + puts " sha1 '#{sha1}' => :#{MacOS.cat}" puts "end" end end |
