class RBT::Uninstall
Public Class Methods
[](i = '')
click to toggle source
new( commandline_arguments = ARGV, run_already = true )
click to toggle source
Public Instance Methods
reset()
click to toggle source
run()
click to toggle source
#¶ ↑
run¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/uninstall.rb, line 59 def run _ = first_argument? if _ # ===================================================================== # # Handle directories here, if we are in the programs_dir? hierarchy. # ===================================================================== # if File.directory?(_) and File.absolute_path(_).include?(programs_dir?) and !(return_pwd == '/') e "#{rev}Uninstalling the program stored at #{sdir(_)} #{rev}next." uninstall_this_directory(_) elsif File.file?(_) # So it is a file. Let's see whether it is registered. dataset_from_libraries = YAML.load_file(yaml_dir?+'registered/libraries.yml') if dataset_from_libraries.has_key? _ points_towards = dataset_from_libraries[_] e "#{rev}This is a registered library. It points towards "+ steelblue(points_towards)+'.' e 'It will be uninstalled next.' e rev+'All libraries that belong to '+steelblue(points_towards)+ rev+' will be collected next.' selection = dataset_from_libraries.select {|key, value| value == points_towards } pp selection e 'TODO: CONTINUE HERE' end end else e "#{rev}Please supply the program that you wish to uninstall." end end