diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-28 07:46:08 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-28 07:46:08 +0000 |
commit | 0b0697030618c4c947a4bc4c6a2895515e522d86 (patch) | |
tree | 5440cead05cfdf2c7db78482211bf2e6911fdca9 /tool | |
parent | 1d4b4bb2315fc4c33f5285cb74dd1e6ae3d5ab90 (diff) | |
download | ruby-0b0697030618c4c947a4bc4c6a2895515e522d86.tar.gz ruby-0b0697030618c4c947a4bc4c6a2895515e522d86.tar.xz ruby-0b0697030618c4c947a4bc4c6a2895515e522d86.zip |
* tool/make-snapshot.rb: had returned wrong sizes for generated
archives.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@19987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/make-snapshot | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot index cb12c879e..b2081f615 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -1,4 +1,5 @@ #!/usr/bin/ruby -s +# -*- coding: US-ASCII -*- require 'uri' require 'digest/md5' require 'digest/sha2' @@ -191,11 +192,14 @@ end revisions.collect {|rev| package(rev, destdir)}.flatten.each do |name| name or next - str = open(name, "rb") {|f| f.read} + str = open(name, "rb:binary") {|f| f.read} md5 = Digest::MD5.hexdigest str sha = Digest::SHA256.hexdigest str - puts "MD5(#{name})= #{md5}" - puts "SHA256(#{name})= #{sha}" - puts "SIZE(name)= #{str.size}" + puts "* #{name}" + puts " SIZE: #{str.bytesize} bytes" + puts " MD5: #{md5}" + puts " SHA256: #{sha}" puts end + +# vim:fileencoding=US-ASCII sw=2 ts=4 noexpandtab ff=unix |