1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Do not keep tar file by the default

This commit is contained in:
Nobuyoshi Nakada 2019-09-03 11:30:40 +09:00
parent c181ecc161
commit 703f0cd3d0
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -55,7 +55,7 @@ PACKAGES = {
"xz" => %w".tar.xz xz -c",
"zip" => %w".zip zip -qr",
}
DEFAULT_PACKAGES = PACKAGES.keys - ["tar"]
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" << {out: IO::NULL}
@ -105,12 +105,12 @@ end
$packages &&= $packages.split(/[, ]+/).tap {|pkg|
if all = pkg.index("all")
pkg[all, 1] = PACKAGES.keys - pkg
pkg[all, 1] = DEFAULT_PACKAGES - pkg
end
pkg -= PACKAGES.keys
pkg.empty? or abort "#{File.basename $0}: unknown packages - #{pkg.join(", ")}"
}
$packages ||= PACKAGES.keys
$packages ||= DEFAULT_PACKAGES
$digests &&= $digests.split(/[, ]+/).tap {|dig|
dig -= DIGESTS
@ -514,11 +514,11 @@ after-update::
if tarball
next if tarball.empty?
else
tarball = cmd.empty? ? file : "#{$archname||v}.tar"
tarball = ext == ".tar" ? file : "#{$archname||v}.tar"
print "creating tarball... #{tarball}"
if tar_create(tarball, v)
puts $colorize.pass(" done")
next if cmd.empty?
next if tarball == file
else
puts $colorize.fail(" failed")
tarball = ""