Module: CheckInstalledMac
- Defined in:
- lib/check_installed_mac.rb
Class Method Summary collapse
-
.check_for_installed(name) ⇒ Object
should output an error messageā¦
Class Method Details
.check_for_installed(name) ⇒ Object
should output an error messageā¦
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/check_installed_mac.rb', line 10 def self.check_for_installed name # check for these with generic "does it run" command = {"gocr" => "gocr --help", "convert" => "convert --help", "ffmpeg" => "ffmpeg -version", "mplayer" => "mplayer"}[name] raise 'unknown ' + name unless command # sanity check unless system("/opt/rdp_project_local/bin/#{command} 1>/dev/null 2>&1") name = 'ImageMagick' if name == 'convert' # special case... puts 'lacking dependency! Please install ' + name + ' by installing from the mac dependencies link from the website first' false else true end end |