Advertisement
eugene_art

Untitled

Jun 14th, 2018
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.64 KB | None | 0 0
  1. require 'net/scp'
  2.  
  3. Net::SCP.start("mrsu.ru", "", :password => ""  ) do |scp|
  4.   scp.upload("/home/icmrsu/generation3/public/templates/.", "/home/bitrix/www/sveden" , :recursive => true) do |ch, name,sent, total|
  5.     if (sent == total)
  6.       puts "#{name}"
  7.     end
  8.   end
  9. end
  10.  
  11.  
  12. Net::SCP.start("mrsu.ru", "", :password => ""  ) do |scp|
  13.   count = Dir["/home/icmrsu/generation3/public/uploads/*"].length
  14.   i = 0
  15.   scp.upload("/home/icmrsu/generation3/public/uploads/.", "/home/bitrix/www/sveden/uploads", :recursive => true) do |ch, name, sent, total|
  16.     if (sent == total)
  17.       i+=1
  18.       puts "#{i}/#{count} : #{name}"
  19.     end
  20.   end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement