Class: CliController
- Inherits:
-
Object
- Object
- CliController
- Defined in:
- lib/cli_controller.rb
Class Method Summary collapse
Class Method Details
.find_executable(executable) ⇒ Object
20 21 22 23 |
# File 'lib/cli_controller.rb', line 20 def self.find_executable(executable) `which #{executable}` $?.success? end |
.print_versions(distro) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cli_controller.rb', line 2 def self.print_versions(distro) puts "Inqlude: #{Inqlude::VERSION}" if find_executable("qmake") qmake_out = `qmake -v` qmake_out =~ /Qt version (.*) in/ puts "Qt: #{$1}" else puts "Qt: not found" end if distro puts "OS: #{distro.name} #{distro.version}" else puts "OS: unknown" end end |