Sha256: f5bf19995e4ac0edb974a912885a9fa4f81abcba5a0312070bb5c29571c57563
Contents?: true
Size: 843 Bytes
Versions: 3
Compression:
Stored size: 843 Bytes
Contents
require 'chef_fs/knife' require 'chef_fs/command_line' class Chef class Knife class Download < ChefFS::Knife banner "download PATTERNS" option :recurse, :long => '--[no-]recurse', :boolean => true, :default => true, :description => "List directories recursively." option :purge, :long => '--[no-]purge', :boolean => true, :default => false, :description => "Delete matching local files and directories that do not exist remotely." def run patterns = pattern_args_from(name_args.length > 0 ? name_args : [ "" ]) # Get the matches (recursively) patterns.each do |pattern| ChefFS::FileSystem.copy_to(pattern, chef_fs, local_fs, config[:recurse] ? nil : 1, config[:purge]) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
knife-essentials-0.4 | lib/chef/knife/download.rb |
knife-essentials-0.3.1 | lib/chef/knife/download.rb |
knife-essentials-0.3 | lib/chef/knife/download.rb |