Class: BuildTool::Commands::Install

Inherits:
ModuleBasedCommand show all
Includes:
MJ::Tools::SubProcess
Defined in:
lib/build-tool/commands/install.rb

Overview

BuildCommand

Instance Attribute Summary

Attributes inherited from Base

#cmd, #options, #parent

Instance Method Summary collapse

Methods inherited from ModuleBasedCommand

#clean, #clone, #configure, #do_execute, #fetch, #initialize, #install, #make, #prepare_module, #rebase, #reconfigure, #remove_build_directory, #remove_source_directory, #summarize

Methods inherited from Standard

#complete_module, #complete_modules, #initialize, #log_directory, #while_logging_to

Methods inherited from Base

#<=>, #cleanup_after_vcs_access, #complete_arguments, #complete_readline, #configuration, #debug, #debug2, #do_complete, #do_execute, #each_option, #error, #execute, #fullname, #info, #initialize, #setup_command, #setup_options, #show_help, #skip_command, #summarize, #teardown_command, #trace, #usage, #verbose, #warn

Methods included from HelpText

#cmdalias, #description, included, #long_description, #name

Constructor Details

This class inherits a constructor from BuildTool::Commands::ModuleBasedCommand

Instance Method Details

#applicable?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/build-tool/commands/install.rb', line 39

def applicable?
    BuildTool::Application.instance.has_recipe?
end

#do_execute_module(mod) ⇒ Object



52
53
54
55
56
57
58
# File 'lib/build-tool/commands/install.rb', line 52

def do_execute_module( mod )
    if mod.checkedout?
        install( mod, @fast )
    else
        info( "Not checked out. Skipping" )
    end
end

#initialize_optionsObject



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/build-tool/commands/install.rb', line 26

def initialize_options
    options.banner = "Usage: #{self.fullname} [OPTIONS]... MODULES..."
    options.separator( "" )
    options.separator( "Options" )

    @fast        = false
    options.on( "--fast", "Fast install. No compile (if supported)" ) { |t|
        @fast = t
        }

    super
end

#is_module_ready?(mod) ⇒ Boolean

Returns:

  • (Boolean)


43
44
45
46
47
48
49
# File 'lib/build-tool/commands/install.rb', line 43

def is_module_ready?( mod )
    isready = true
    if !mod.checkedout?
        warn( "#{mod.name}: module not checked out -> skipping." )
    end
    return isready
end

#log?Boolean

Log this command if $noop is not active

Returns:

  • (Boolean)


22
23
24
# File 'lib/build-tool/commands/install.rb', line 22

def log?
    ! $noop
end