summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-20 16:02:21 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-20 16:02:21 +0000
commita889f3405f15bc2996dc307c5593a538986816ff (patch)
tree873e4c2ff80bfa29b8e456429df851eacdd11c5e /tool
parent7ba5c4e83b90a2e66ca3b3b7619b5d4565eaec4b (diff)
* tool/make-snapshot: do not use sha256sum; use BASERUBY instead
* common.mk (dist): use tool/make-snapshot instead git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/make-snapshot15
1 files changed, 10 insertions, 5 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 92a30323fe..81b3b03b70 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -93,9 +93,14 @@ for rev; do
rm -fr $v
done
for file in $files; do
- md5=$(md5sum $file)
- sha256=$(sha256sum $file)
- echo "MD5(${file##*/})= ${md5%% *}"
- echo "SHA256(${file##*/})= ${sha256%% *}"
- echo "SIZE(${file##*/})= `find $file -printf %s`"
+ ${BASERUBY} -r digest/md5 -r digest/sha2 <<EOF
+ name = "$file"
+ str = ARGF.read
+ md5 = Digest::MD5.hexdigest str
+ sha = Digest::SHA256.hexdigest str
+ printf "MD5(%s)= %s\nSHA256(%s)= %s\nSIZE(%s)= %s\n\n",
+ name, md5,
+ name, sha,
+ name, str.size
+EOF
done