Sha256: 72abdcfa9c6e3210606115604540e08b954a5760c01cdf5258626a0ef5e35aa1

Contents?: true

Size: 1.51 KB

Versions: 12

Compression:

Stored size: 1.51 KB

Contents

# -*- coding: UTF-8 -*-

require 'mj/tools/subprocess'
require 'build-tool/application'
require 'build-tool/commands'

module BuildTool; module Commands;

    class CtagsError < BuildTool::Error; end
    #
    # BuildCommand
    #
    class Install < ModuleBasedCommand

        include MJ::Tools::SubProcess

        name        "install"
        description "install the module"
        long_description [ "Invokes the installation phase for the specified modules." ]

        # Log this command if $noop is not active
        def log?
            ! $noop
        end

        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

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

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


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

    end # class Build

end; end # module BuildTool::Commands





Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
build-tool-0.6.9 lib/build-tool/commands/install.rb
build-tool-0.6.8 lib/build-tool/commands/install.rb
build-tool-0.6.7 lib/build-tool/commands/install.rb
build-tool-0.6.6 lib/build-tool/commands/install.rb
build-tool-0.6.5 lib/build-tool/commands/install.rb
build-tool-0.6.4 lib/build-tool/commands/install.rb
build-tool-0.6.3 lib/build-tool/commands/install.rb
build-tool-0.6.2 lib/build-tool/commands/install.rb
build-tool-0.6.1 lib/build-tool/commands/install.rb
build-tool-0.6.0 lib/build-tool/commands/install.rb
build-tool-0.6.0.rc2 lib/build-tool/commands/install.rb
build-tool-0.6.0.rc1 lib/build-tool/commands/install.rb