class RBT::Cookbooks::DownloadAllSourceArchives
Constants
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
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
commandline_arguments?()
click to toggle source
#¶ ↑
commandline_arguments?¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/download_all_source_archives.rb, line 106 def commandline_arguments? @commandline_arguments end
Also aliased as: input?
consider_downloading_this_program(i)
click to toggle source
#¶ ↑
consider_downloading_this_program
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/download_all_source_archives.rb, line 175 def consider_downloading_this_program(i) require 'rbt/cookbooks/class/class.rb' cd_to_the_archive_directory # Always enter the archive directory. # ======================================================================= # # Next, check whether the program exists. # ======================================================================= # _ = RBT::Cookbooks::Cookbook.new(i) { :bypass_menu_check } program_path = _.program_path? remote_url = _.remote_url? unless File.exist? program_path this_directory = "#{@archive_directory}#{i}/" unless File.directory? this_directory opnn; e "Creating the directory `#{sdir(this_directory)}` next." mkdir this_directory end cd this_directory unless File.exist? program_path download(remote_url) opnn; e "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/utility_scripts/download_all_source_archives.rb, line 145 def report_the_archive_directory_in_use if @tag opnn; e "All registered programs with the tag #{sfancy(@tag)}"\ " will be downloaded into the directory:" else opnn; e '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/utility_scripts/download_all_source_archives.rb, line 66 def reset super() @tag = nil @archive_directory = source_directory? @available_programs = available_programs? # <- Must come before the menu() call. @namespace = NAMESPACE end
run()
click to toggle source
set_commandline_arguments(i = '')
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/utility_scripts/download_all_source_archives.rb, line 160 def show_help opnn; e 'This class allows you to download source archives.' opnn; e 'You can also selectively download only certain entries, in' opnn; e 'particular those who have registered tags.' e opnn; e 'For example, if you wish to download all KDE-plasma related entries' opnn; e 'then you can issue the following command:' e opnn; e sfancy(' download_all_source_archives --tags=plasma') e end