[前][次][番号順一覧][スレッド一覧]

ruby-changes:33857

From: nobu <ko1@a...>
Date: Wed, 14 May 2014 00:47:50 +0900 (JST)
Subject: [ruby-changes:33857] nobu:r45938 (trunk): make-snapshot: -digests option

nobu	2014-05-14 00:47:36 +0900 (Wed, 14 May 2014)

  New Revision: 45938

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45938

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

  Modified files:
    trunk/tool/make-snapshot
Index: tool/make-snapshot
===================================================================
--- tool/make-snapshot	(revision 45937)
+++ tool/make-snapshot	(revision 45938)
@@ -22,6 +22,7 @@ options: https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L22
   -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(/[, ]+/).t https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L75
 }
 $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, de https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L339
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]