Skip to content

Commit

Permalink
Add helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
coderobe committed Dec 24, 2017
1 parent 9480f3d commit 454aa4a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/utils.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require "cocaine"
require "mkmf"
require "find"

module VBiosFinder
class Utils
@@current_files = []
def self.get_new_files
current_files = Find.find(".").reject{|e| File.directory? e}
result = current_files - @@current_files
@@current_files = current_files
return result
end
def self.installed? program, reason="optional"
if find_executable(program).nil?
puts "Install '#{program}' on your system (#{reason})"
false
else
true
end
end
end
end

0 comments on commit 454aa4a

Please sign in to comment.