Class: SystemUtils
Overview
Class containing system utility funcions.
Instance Method Summary collapse
-
#setup ⇒ Object
Sets up the class.
-
#tcsh_shell? ⇒ Boolean
Checks the system shell to see if it a tcsh shell.
Instance Method Details
#setup ⇒ Object
Sets up the class.
23 24 25 |
# File 'lib/ceedling/system_utils.rb', line 23 def setup @tcsh_shell = nil end |
#tcsh_shell? ⇒ Boolean
Checks the system shell to see if it a tcsh shell.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ceedling/system_utils.rb', line 29 def tcsh_shell? # once run a single time, return state determined at that execution return @tcsh_shell unless @tcsh_shell.nil? result = @system_wrapper.shell_backticks(command:'echo $version') if ((result[:exit_code] == 0) and (result[:output].strip =~ /^tcsh/)) @tcsh_shell = true else @tcsh_shell = false end return @tcsh_shell end |