Sha256: b8cadf0cf0a2e620348759a495ff9904006c99f9b807c81ca87162289afaeb94

Contents?: true

Size: 911 Bytes

Versions: 6

Compression:

Stored size: 911 Bytes

Contents

require 'build-tool/commands'

module BuildTool; module Commands; module Modules

    #
    # BuildCommand
    #
    class Shell < Standard

        include MJ::Tools::SubProcess

        name        "shell"
        description "open a shell having the modules environment."

        def initialize_options
            super
        end

        def do_execute( args )
            # Check the number of commandline args
            if args.length != 1
                return usage( "Wrong number of arguments" )
            end

            # Translate argument into modules
            mod = complete_modules( args[0] )
            if mod.length != 1
                return usage( "This command only works on one module" )
            end

            # Get our one and only module
            mod[0].environment.shell
        end

    end # class Shell

end; end; end # module BuildTool::Commands::Modules



Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
build-tool-0.2 lib/build-tool/commands/modules/shell.rb
build-tool-0.1.4 lib/build-tool/commands/modules/shell.rb
build-tool-0.1.3 lib/build-tool/commands/modules/shell.rb
build-tool-0.1.2 lib/build-tool/commands/modules/shell.rb
build-tool-0.1.0 lib/build-tool/commands/modules/shell.rb
build-tool-0.1.1 lib/build-tool/commands/modules/shell.rb