class RBT::CopyTheseArchives
Public Class Methods
[](i = ARGV)
click to toggle source
new( commandline_arguments = ARGV, run_already = true )
click to toggle source
Public Instance Methods
copy_this_archive(i)
click to toggle source
do_work_on_these_files( i = commandline_arguments? )
click to toggle source
#¶ ↑
do_work_on_these_files
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/copy_these_archives.rb, line 70 def do_work_on_these_files( i = commandline_arguments? ) i.each {|this_target| full_target_path = this_target.dup if RBT.respond_to? :swift_return_version_of_this_program version_of_the_program = return_version_of_this_program(this_target) else version_of_the_program = action(:SanitizeCookbook, this_target) { :fast }.program_version? end unless this_target.include? '/' unless File.file?(this_target) full_target_path = src_dir?+this_target end end # ===================================================================== # # this_target may now look like this: # # /home/x/src/linux # # We will next have to obtain the most recent version of the program. # ===================================================================== # unless full_target_path.end_with? '/' full_target_path << '/' end # ===================================================================== # # Now we can attempt to find a locally existing file. We will grab the # first entry found, if the result is not empty. # ===================================================================== # use_this_target = full_target_path+this_target+'-'+version_of_the_program+'*' possible_files = Dir[use_this_target] unless possible_files.empty? copy_this_archive(possible_files.first) end } end
reset()
click to toggle source