summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-15 02:33:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-15 02:33:56 +0000
commit10840d3abba05e41cbdb215db3a5a38dea3c0fad (patch)
tree8b65b6f75859a61a1bda5a9aacd699c55dd9b299
parentbacadbe9bfae2a9183934c08baaaefdec6d8dafe (diff)
make-snapshot: prefer default commands over 7z [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rwxr-xr-xtool/make-snapshot8
1 files changed, 6 insertions, 2 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot
index 3e66eea..e3da768 100755
--- a/tool/make-snapshot
+++ b/tool/make-snapshot
@@ -45,8 +45,12 @@ PACKAGES = {
}
if system("7z", out: IO::NULL)
- PACKAGES["gzip"] = %w".tar.gz 7z a dummy -tgzip -mx -so"
- PACKAGES["zip"] = %w".zip 7z a -tzip -mx"
+ unless system(PACKAGES["gzip"][1..-1], in: IO::NULL, out: IO::NULL, err: :close)
+ PACKAGES["gzip"] = %w".tar.gz 7z a dummy -tgzip -mx -so"
+ end
+ unless system(PACKAGES["zip"][1..-1], in: IO::NULL, out: IO::NULL, err: :close)
+ PACKAGES["zip"] = %w".zip 7z a -tzip -mx"
+ end
end
if gzip = ENV.delete("GZIP")
PACKAGES["gzip"].concat(gzip.shellsplit)