Sha256: e9d61a274672abf60a17f2ddaa187d847e482588eb88f52a12d3f1074e7ccca4

Contents?: true

Size: 536 Bytes

Versions: 12

Compression:

Stored size: 536 Bytes

Contents

module BackupPlugins
  module Files
    def files path

      puts "\n\tbackup.files(#{path})\n"
      
      path = run_cmd("echo #{path}").strip # expand "~/"
      
      file_target_dir = "#{backup_target_dir}#{path}"
      
      run_cmd("mkdir -p #{file_target_dir}")

      cmd = "cp -a #{path} #{file_target_dir}"

      unless(run_cmd('which ionice').blank? || run_cmd('ionice -c3 ls').match(/ioprio_set: Operation not permitted/))
        cmd = "ionice -c3 #{cmd}"
      end
        
      puts run_cmd(cmd)

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
keepitsafe-0.2.6 lib/plugins/files.rb
keepitsafe-0.2.5 lib/plugins/files.rb
keepitsafe-0.2.4 lib/plugins/files.rb
keepitsafe-0.2.3 lib/plugins/files.rb
keepitsafe-0.2.2 lib/plugins/files.rb
keepitsafe-0.2.1 lib/plugins/files.rb
keepitsafe-0.2.0 lib/plugins/files.rb
keepitsafe-0.1.10 lib/plugins/files.rb
keepitsafe-0.1.7 lib/plugins/files.rb
keepitsafe-0.1.5 lib/plugins/files.rb
keepitsafe-0.1.4 lib/plugins/files.rb
keepitsafe-0.1.3 lib/plugins/files.rb