Sha256: 3bd7300527387450670ce3be2978db2305d4e8ac7679193a2e0f3face478171d
Contents?: true
Size: 478 Bytes
Versions: 12
Compression:
Stored size: 478 Bytes
Contents
require 'rbatch' RBatch::Log.new do |log| require 'fileutils' require 'date' target_dir = RBatch::config["target_dir"] RBatch::config["file_list"].each do |file_wildcard| Dir::glob(file_wildcard).each do |file| if ! File.exists?(File.join(target_dir,File.basename(file))) log.info("Copy " + file + " " + target_dir) FileUtils.cp(file,target_dir) else log.info("Skip " + file + " (already backuped)") end end end end
Version data entries
12 entries across 12 versions & 1 rubygems