Sha256: aad75e69bb1bbf952f9c354c6d3248df62437e807c4361da5d2ac21243816db5

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 KB

Contents

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

require 'build-tool/commands'

module BuildTool; module Commands; module Environments

    #
    # BuildCommand
    #
    class Set < Standard

        name        "set"
        description "Open a shell with the environment set."
        long_description "Opens a new shell with the exact environment used by build-tool for the script."

        def do_execute( args )
            case args.length
            when 0
                return usage( "Not enough arguments." )
            when 1
                # OK
            else
                return usage( "To many arguments." )
            end

            # Get the environment.
            env = configuration.environment(args[0])
            return env.shell
        end

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

    end # class

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



Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
build-tool-0.6.1 lib/build-tool/commands/environments/set.rb
build-tool-0.6.0 lib/build-tool/commands/environments/set.rb
build-tool-0.6.0.rc2 lib/build-tool/commands/environments/set.rb
build-tool-0.6.0.rc1 lib/build-tool/commands/environments/set.rb