Sha256: 0a4e63ce9cb5957885d4d76709de74f94bf4693113536b7afe74eaac5b3cf2c7

Contents?: true

Size: 835 Bytes

Versions: 3

Compression:

Stored size: 835 Bytes

Contents

module Rebuild::CLI
  class RbldModifyCommand < Command
    def initialize
      @usage = [
                { :syntax => "modify [OPTIONS] [ENVIRONMENT[:TAG]]",
                  :description => "Interactive mode: opens shell in the " \
                                  "specified enviroment" },
                { :syntax => "modify [OPTIONS] [ENVIRONMENT[:TAG]] -- COMMANDS",
                  :description => "Scripting mode: runs COMMANDS in the " \
                                  "specified environment" }
               ]
      @description = "Modify a local environment"
    end

    def run(parameters)
      env = Environment.new( parameters.shift )
      cmd = get_cmdline_tail( parameters )
      rbld_log.info("Going to modify \"#{env}\" with \"#{cmd}\"")
      @errno = engine_api.modify!( env, cmd )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rbld-1.0.2 cli/lib/commands/rbld_modify.rb
rbld-1.0.1 cli/lib/commands/rbld_modify.rb
rbld-1.0.0 cli/lib/commands/rbld_modify.rb