aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-01-18 21:57:42 +0000
committerMike McQuaid2014-01-19 14:19:07 -0800
commitf6abf315ebec4a9980d7d5c1bcc42f71b8901e62 (patch)
tree7b4b50677e34d361b768feeb586985435726cdd3 /Library
parentd230f95b77c9d8c2018b3e3e498f8340519aefe5 (diff)
downloadhomebrew-f6abf315ebec4a9980d7d5c1bcc42f71b8901e62.tar.bz2
keg: add function to detect if .app(s) installed.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/keg.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index 8ad5ffaea..442976c8b 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -96,6 +96,10 @@ class Keg < Pathname
(self/'lib/python2.7/site-packages').directory?
end
+ def app_installed?
+ not Dir.glob("#{self}/{,libexec/}*.app").empty?
+ end
+
def version
require 'version'
Version.new(basename.to_s)