bottle: sort --merge output in OS X version order.

This commit is contained in:
Mike McQuaid 2013-06-22 10:14:51 +01:00
parent c59800011a
commit 79f9da3c22

View File

@ -24,10 +24,14 @@ module Homebrew extend self
puts " cellar '#{cellar}'" if bottle.cellar.to_s != '/usr/local/Cellar' puts " cellar '#{cellar}'" if bottle.cellar.to_s != '/usr/local/Cellar'
puts " revision #{bottle.revision}" if bottle.revision > 0 puts " revision #{bottle.revision}" if bottle.revision > 0
Checksum::TYPES.each do |checksum_type| Checksum::TYPES.each do |checksum_type|
checksum_cat = bottle.send checksum_type checksum_os_versions = bottle.send checksum_type
next unless checksum_cat next unless checksum_os_versions
checksum_cat.each do |cat, checksum| os_versions = checksum_os_versions.keys
puts " #{checksum_type} '#{checksum}' => :#{cat}" os_versions.map! {|osx| MacOS::Version.from_symbol osx }
os_versions.sort.reverse.each do |os_version|
osx = os_version.to_sym
checksum = checksum_os_versions[osx]
puts " #{checksum_type} '#{checksum}' => :#{osx}"
end end
end end
puts "end" puts "end"