summaryrefslogtreecommitdiff
path: root/tool/rakelib/sync_tool.rake
diff options
context:
space:
mode:
Diffstat (limited to 'tool/rakelib/sync_tool.rake')
-rw-r--r--tool/rakelib/sync_tool.rake15
1 files changed, 15 insertions, 0 deletions
diff --git a/tool/rakelib/sync_tool.rake b/tool/rakelib/sync_tool.rake
new file mode 100644
index 0000000000..ee69efffcb
--- /dev/null
+++ b/tool/rakelib/sync_tool.rake
@@ -0,0 +1,15 @@
+task :sync_tool, [:from] do |t, from: (File.identical?(__dir__, "rakelib") ? "../ruby/tool" : __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