blob: 8ea8cb0ad257cf157a82d7ccb2b4bfd2e3429219 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
task :sync_tool, [:from] do |t, from: nil|
from ||= (File.identical?(__dir__, "rakelib") ? "../ruby/tool" : File.dirname(__dir__))
require 'fileutils'
{
"rakelib/sync_tool.rake" => "rakelib",
"lib/core_assertions.rb" => "test/lib",
"lib/envutil.rb" => "test/lib",
"lib/find_executable.rb" => "test/lib",
"lib/helper.rb" => "test/lib",
}.each do |src, dest|
FileUtils.mkpath(dest)
FileUtils.cp "#{from}/#{src}", dest
rescue Errno::ENOENT
end
end
|