class 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/cookbooks/utility_scripts/download_all_source_archives.rb, line 95 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/cookbooks/utility_scripts/download_all_source_archives.rb, line 164 def consider_downloading_this_program(i) unless Cookbooks.const_defined? :Cookbook require 'cookbooks/class/class.rb' end cd_to_the_archive_directory # Always enter the archive directory. # ======================================================================= # # Next, check whether the program exists. # ======================================================================= # _ = 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
opnn()
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/cookbooks/utility_scripts/download_all_source_archives.rb, line 134 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
Cookbooks::Base#reset
# File lib/cookbooks/utility_scripts/download_all_source_archives.rb, line 56 def reset super() @tag = nil @archive_directory = source_directory? @available_programs = available_programs? # <- Must come before the menu() call. 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/cookbooks/utility_scripts/download_all_source_archives.rb, line 149 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