aboutsummaryrefslogtreecommitdiffstats
path: root/tool/make-snapshot
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-13 15:47:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-13 15:47:36 +0000
commit9fd859b860f376e3a120e7a51dee7e69cd587c77 (patch)
treebe48fca619c2b16df702bfe9ff3b7be4130b63ee /tool/make-snapshot
parentbebbbc393a78e3d5220f196dd76d4b3583f74f0d (diff)
downloadruby-9fd859b860f376e3a120e7a51dee7e69cd587c77.tar.gz
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
Diffstat (limited to 'tool/make-snapshot')
-rwxr-xr-xtool/make-snapshot9
1 files changed, 8 insertions, 1 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 99f80de560..f154ac435a 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -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