Skip to content

Commit

Permalink
Should fail if system failed
Browse files Browse the repository at this point in the history
  • Loading branch information
unak committed Oct 2, 2019
1 parent 1560696 commit 5af2c87
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tool/make-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,10 @@ def package(vcs, rev, destdir, tmp = nil)
File.directory?(n) or File.rename v, n
v = n

system(*%W"patch -d #{v} -p0 -i #{$patch_file}") if $patch_file
if $patch_file && !system(*%W"patch -d #{v} -p0 -i #{$patch_file}")
puts $colorize.fail("patching failed")
return
end
def (clean = []).add(n) push(n); n end
Dir.chdir(v) do
unless File.exist?("ChangeLog")
Expand Down Expand Up @@ -451,7 +454,10 @@ touch-unicode-files:
ENV["CACHE_SAVE"] = "no"
make = ENV["MAKE"] || ENV["make"] || "make"
args = args.map {|arg| arg.join("=")}
system(make, "update-download", *args)
unless system(make, "update-download", *args)
puts $colorize.fail("update-download failed")
return
end
clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk", "ext/ripper/y.output", ".revision.time")
Dir.glob("**/*") do |dest|
next unless File.symlink?(dest)
Expand All @@ -467,7 +473,10 @@ touch-unicode-files:
end
modified = new_time
end
system(make, "prepare-package", "clean-cache", *args)
unless system(make, "prepare-package", "clean-cache", *args)
puts $colorize.fail("prepare-package failed")
return
end
print "prerequisites"
else
system(*%W"#{YACC} -o parse.c parse.y")
Expand Down

0 comments on commit 5af2c87

Please sign in to comment.