class RBT::Cookbooks::DownloadAllSourceArchives
Public Class Methods
[](i = '')
click to toggle source
new( commandline_arguments = nil, run_already = true )
click to toggle source
Public Instance Methods
cd_to_the_archive_directory()
click to toggle source
consider_downloading_this_program(i)
click to toggle source
#¶ ↑
consider_downloading_this_program
¶ ↑
#¶ ↑
# File lib/rbt/cookbooks/download_all_source_archives.rb, line 175 def consider_downloading_this_program(i) require 'rbt/requires/require_the_cookbook_class.rb' cd_to_the_archive_directory # Always enter the archive directory. # ======================================================================= # # Next, check whether the program exists. # ======================================================================= # _ = RBT::Cookbooks::SanitizeCookbook.new(i) { :fast } program_path = _.program_path? remote_url = _.remote_url? unless File.exist? program_path this_directory = "#{@archive_directory}#{i}/" unless File.directory? this_directory opne "Creating the directory `#{sdir(this_directory)}` next." mkdir this_directory end cd this_directory unless File.exist? program_path download(remote_url) opne "Next downloading `#{simp(remote_url)}`." end end end
dataset?()
click to toggle source
download(i)
click to toggle source
process_the_programs_one_after_the_other( i = @available_programs )
click to toggle source
register_this_tag(i)
click to toggle source
report_the_archive_directory_in_use()
click to toggle source
#¶ ↑
report_the_archive_directory_in_use
¶ ↑
#¶ ↑
# File lib/rbt/cookbooks/download_all_source_archives.rb, line 145 def report_the_archive_directory_in_use if @tag opne "All registered programs with the tag #{sfancy(@tag)}"\ " will be downloaded into the directory:" else opne 'All registered programs will be downloaded into the directory:' end e e sfile(" #{@archive_directory}") e end
reset()
click to toggle source
#¶ ↑
reset (reset tag)¶ ↑
#¶ ↑
Calls superclass method
RBT::Base#reset
# File lib/rbt/cookbooks/download_all_source_archives.rb, line 66 def reset super() infer_the_namespace # ======================================================================= # # === @tag # ======================================================================= # @tag = nil # ======================================================================= # # === @archive_directory # ======================================================================= # @archive_directory = source_directory? # ======================================================================= # # === @available_programs # ======================================================================= # @available_programs = available_programs? # <- Must come before the menu() call. end
run()
click to toggle source
set_use_these_cookbooks(i)
click to toggle source
show_help()
click to toggle source
#¶ ↑
show_help
(help tag)¶ ↑
#¶ ↑
# File lib/rbt/cookbooks/download_all_source_archives.rb, line 160 def show_help opne 'This class allows you to download source archives.' opne 'You can also selectively download only certain entries, in' opne 'particular those who have registered tags.' e opne 'For example, if you wish to download all KDE-plasma related entries' opne 'then you can issue the following command:' e opnfancy ' download_all_source_archives --tags=plasma' e end