summaryrefslogtreecommitdiff
path: root/tool/make-snapshot
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-24 08:16:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-24 08:16:52 +0000
commit0b9aac597f110e9704f50ea5b11ecf500aade5a3 (patch)
tree6b35e7695cdc99e9ee77f26586ddb7936563859d /tool/make-snapshot
parentb5f3b4cb0906b77c385f0e950b4ebdf1336e9ee8 (diff)
make-snapshot: fix gems update
* tool/make-snapshot (package): call system and IO.popen with arguments array, add macros NULLCMD and RUNRUBY to update gems, and not subsitute string interpolations which are used in update-gems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/make-snapshot')
-rwxr-xr-xtool/make-snapshot30
1 files changed, 18 insertions, 12 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 7b0e371..a12c141 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -171,7 +171,7 @@ def package(rev, destdir)
else
v = "ruby"
puts "Exporting #{rev}@#{revision}"
- IO.popen("svn export -r #{revision} #{url} #{v}") do |pipe|
+ IO.popen(%W"svn export -r #{revision} #{url} #{v}") do |pipe|
pipe.each {|line| /^A/ =~ line or print line}
end
unless $?.success?
@@ -213,7 +213,7 @@ def package(rev, destdir)
File.directory?(n) or File.rename v, n
v = n
end
- system("patch -d #{v} -p0 -i #{$patch_file}") if $patch_file
+ system(*%W"patch -d #{v} -p0 -i #{$patch_file}") if $patch_file
"take a breath, and go ahead".scan(/./) {|c|print c; sleep(c == "," ? 0.7 : 0.05)}; puts
def (clean = []).add(n) push(n); n end
Dir.chdir(v) do
@@ -223,7 +223,7 @@ def package(rev, destdir)
end
unless File.exist?("configure")
print "creating configure..."
- unless system(ENV["AUTOCONF"])
+ unless system([ENV["AUTOCONF"]]*2)
puts " failed"
return
end
@@ -256,19 +256,25 @@ def package(rev, destdir)
}
FileUtils.mkpath(hdrdir = "#{extout}/include/ruby")
File.open("#{hdrdir}/config.h", "w") {}
- miniruby = ENV['MINIRUBY'] + " -r./cross"
+ miniruby = ENV['MINIRUBY'] + " -I. -rcross"
mk = IO.read("Makefile.in").gsub(/^@.*\n/, '').gsub(/@([A-Za-z_]\w*)@/) {ENV[$1]}
- mk << commonmk.gsub(/\{[^{}]*\}/, "")
- IO.popen("make -f - #{mk[/^after-update/]} prereq"\
- " srcdir=. CHDIR=cd PATH_SEPARATOR='#{File::PATH_SEPARATOR}'"\
- " IFCHANGE=tool/ifchange MAKEDIRS='mkdir -p'"\
- " 'MINIRUBY=#{miniruby}' 'RUBY=#{ENV["RUBY"]}'", "w") do |f|
+ mk << commonmk.gsub(/(?<!#)\{[^{}]*\}/, "")
+ cmd = %W[make -f -
+ srcdir=. CHDIR=cd NULLCMD=:
+ PATH_SEPARATOR=#{File::PATH_SEPARATOR}
+ IFCHANGE=tool/ifchange MAKEDIRS=mkdir\ -p
+ MINIRUBY=#{miniruby}
+ RUNRUBY=#{miniruby}
+ RUBY=#{ENV["RUBY"]}
+ prereq]
+ IO.popen(cmd, "w") do |f|
f.puts mk
+ f.puts "after-update::", "prereq: after-update"
end
clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk")
print "prerequisites"
else
- system("#{YACC} -o parse.c parse.y")
+ system(*%W"#{YACC} -o parse.c parse.y")
end
FileUtils.rm_rf(clean)
unless $?.success?
@@ -307,10 +313,10 @@ def package(rev, destdir)
end
end
print "creating #{mesg} tarball... #{file}"
- done = system(*(cmd + [tarball]), out: file)
+ done = system(*cmd, tarball, out: file)
else
print "creating #{mesg} archive... #{file}"
- done = system(*(cmd + [file, v]))
+ done = system(*cmd, file, v)
end
if done
puts " done"