1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

make-snapshot: -digests option

* tool/make-snapshot (package): add -digests option to select
  digest algorithms to be shown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-05-13 15:47:36 +00:00
parent bebbbc393a
commit 9fd859b860

View file

@ -22,6 +22,7 @@ options:
-keep_temp keep temporary working directory
-patch_file=PATCH apply PATCH file after export
-packages=PKG[,...] make PKG packages (#{PACKAGES.keys.join(", ")})
-digests=ALG[,...] show ALG digests (#{DIGESTS.join(", ")})
version:
trunk, stable, branches/*, tags/*, X.Y.Z, X.Y.Z-pL
each versions may be followed by optional @revision.
@ -74,6 +75,12 @@ $packages &&= $packages.split(/[, ]+/).tap {|pkg|
}
$packages ||= PACKAGES.keys
$digests &&= $digests.split(/[, ]+/).tap {|dig|
dig -= DIGESTS
dig.empty? or abort "#{File.basename $0}: unknown digests - #{dig.join(", ")}"
}
$digests ||= DIGESTS
$patch_file &&= File.expand_path($patch_file)
path = ENV["PATH"].split(File::PATH_SEPARATOR)
%w[YACC BASERUBY RUBY MV MINIRUBY].each do |var|
@ -332,7 +339,7 @@ revisions.collect {|rev| package(rev, destdir)}.flatten.each do |name|
str = open(name, "rb") {|f| f.read}
puts "* #{name}"
puts " SIZE: #{str.bytesize} bytes"
DIGESTS.each do |alg|
$digests.each do |alg|
printf " %-8s%s\n", "#{alg}:", Digest.const_get(alg).hexdigest(str)
end
end