Class: Commands::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/shell.rb

Instance Method Summary collapse

Instance Method Details

#optionsObject

holds the options that were passed you can set any initial defaults here



13
14
15
16
# File 'lib/commands/shell.rb', line 13

def options
  @options ||= {
  }
end

#register(opts, global_options) ⇒ Object



24
25
26
27
# File 'lib/commands/shell.rb', line 24

def register(opts, global_options)
  opts.banner = "Usage: shell"
  opts.description = "Test running of a shell script."
end

#required_optionsObject

required options



19
20
21
22
# File 'lib/commands/shell.rb', line 19

def required_options
  @required_options ||= Set.new [
  ]
end

#run(global_options) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/commands/shell.rb', line 29

def run(global_options)
  config_repo_url = EcbSharedLib.prepare_config_repo(nil)
  base = EcbSharedLib.full_config_path(config_repo_url)
  newpath = File.expand_path(File.join(base, "scripts"))
  cmd = "./ecb_test.sh"
  EcbSharedLib::CL.do_cmd(cmd, newpath)
end