summaryrefslogtreecommitdiff
path: root/tool/extlibs.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-22 00:27:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-22 00:27:14 +0000
commit966bfb07f6a7d1480abf8e48688294716218b72e (patch)
tree2fa22603404b252526860c6877c72107f2135e92 /tool/extlibs.rb
parentee691feac87738fb15b822e9f79fb31d601b3815 (diff)
Add sha512
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/extlibs.rb')
-rwxr-xr-xtool/extlibs.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/tool/extlibs.rb b/tool/extlibs.rb
index d59a139b0f..10609ebb16 100755
--- a/tool/extlibs.rb
+++ b/tool/extlibs.rb
@@ -142,16 +142,24 @@ class ExtLibs
end
extracted = false
dest = File.dirname(list)
+ url = chksums = nil
IO.foreach(list) do |line|
line.sub!(/\s*#.*/, '')
- if /^\t/ =~ line
+ if chksums
+ chksums.concat(line.split)
+ elsif /^\t/ =~ line
if extracted and (mode == :all or mode == :patch)
patch, *args = line.split
do_patch(dest, patch, args)
end
next
+ else
+ url, *chksums = line.split(' ')
+ end
+ if chksums.last == '\\'
+ chksums.pop
+ next
end
- url, *chksums = line.split(' ')
next unless url
begin
extracted = do_command(mode, dest, url, cache_dir, chksums)
@@ -159,6 +167,7 @@ class ExtLibs
warn e.inspect
success = false
end
+ url = chksums = nil
end
end
end