module Mixlibrary::Core::Shell

Public Class Methods

shell_out(command, options=nil) click to toggle source
# File lib/mixlibrary/core/shell/app.rb, line 36
def self.shell_out(command, options=nil)
  shellclass=Shell::ShellCall.new
  return shellclass.shell(command, options)
end
shell_out!(command, options=nil) click to toggle source

Shell Out

# File lib/mixlibrary/core/shell/app.rb, line 31
def self.shell_out!(command, options=nil)
  shellclass=Shell::ShellCall.new
  return shellclass.shell!(command, options)
end
windows_script_out(shellType,script, options=nil, flags=nil,desiredarchitecture=nil) click to toggle source

Scripts

# File lib/mixlibrary/core/shell/app.rb, line 20
def self.windows_script_out(shellType,script, options=nil, flags=nil,desiredarchitecture=nil)
  return run_windows_script(shellType,false,script, options, flags,desiredarchitecture)
end
windows_script_out!(shellType,script, options=nil, flags=nil,desiredarchitecture=nil ) click to toggle source
# File lib/mixlibrary/core/shell/app.rb, line 24
def self.windows_script_out!(shellType,script, options=nil, flags=nil,desiredarchitecture=nil )
  return run_windows_script(shellType,true,script, options, flags,desiredarchitecture)
end

Private Class Methods

run_windows_script(shellType, validate, script, options, flags, architecture) click to toggle source
# File lib/mixlibrary/core/shell/app.rb, line 42
def self.run_windows_script(shellType, validate, script, options, flags, architecture)
  case shellType
  when :powershell
    
    obj= Shell::Scripts::Powershell.new(script, validate, options, flags,architecture)
    return obj.orchestrate
  
  else
    raise "Shell not supported.  Currently supports: :powershell for now!"
  end
end