* tool/rbinstall.rb (strip_file): accept an array of path names.
* tool/rbinstall.rb (install): allow multiple path names. [ruby-core:38379] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a58c76cc20
commit
fba1063c5f
@ -136,7 +136,7 @@ def install?(*types, &block)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def strip_file(file)
|
def strip_file(files)
|
||||||
if !defined?($strip_command) and (cmd = CONFIG["STRIP"])
|
if !defined?($strip_command) and (cmd = CONFIG["STRIP"])
|
||||||
case cmd
|
case cmd
|
||||||
when "", "true", ":" then return
|
when "", "true", ":" then return
|
||||||
@ -145,7 +145,7 @@ def strip_file(file)
|
|||||||
elsif !$strip_command
|
elsif !$strip_command
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
system(*($strip_command + [file]))
|
system(*($strip_command + [files].flatten))
|
||||||
end
|
end
|
||||||
|
|
||||||
def install(src, dest, options = {})
|
def install(src, dest, options = {})
|
||||||
@ -154,12 +154,13 @@ def install(src, dest, options = {})
|
|||||||
options[:preserve] = true
|
options[:preserve] = true
|
||||||
d = with_destdir(dest)
|
d = with_destdir(dest)
|
||||||
super(src, d, options)
|
super(src, d, options)
|
||||||
|
srcs = Array(src)
|
||||||
if strip
|
if strip
|
||||||
d = File.join(d, File.basename(src)) if $made_dirs[dest]
|
d = srcs.map {|src| File.join(d, File.basename(src))} if $made_dirs[dest]
|
||||||
strip_file(d)
|
strip_file(d)
|
||||||
end
|
end
|
||||||
if $installed_list
|
if $installed_list
|
||||||
dest = File.join(dest, File.basename(src)) if $made_dirs[dest]
|
dest = srcs.map {|src| File.join(dest, File.basename(src))} if $made_dirs[dest]
|
||||||
$installed_list.puts dest
|
$installed_list.puts dest
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -570,10 +571,8 @@ end
|
|||||||
bin_dir = File.join(gem_dir, 'gems', full_name, 'bin')
|
bin_dir = File.join(gem_dir, 'gems', full_name, 'bin')
|
||||||
makedirs(bin_dir)
|
makedirs(bin_dir)
|
||||||
|
|
||||||
execs.each do |exec|
|
execs = execs.map {|exec| File.join(srcdir, 'bin', exec)}
|
||||||
exec = File.join(srcdir, 'bin', exec)
|
install(execs, bin_dir, :mode => $prog_mode)
|
||||||
install(exec, bin_dir, :mode => $prog_mode)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user