From 90146de46cf8ca948b79848392bd808edc462a83 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 21 Oct 2013 06:45:56 -0400 Subject: [PATCH] Add app_exists --- zsh/lib/os | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zsh/lib/os b/zsh/lib/os index 301b7b53..20fe8127 100644 --- a/zsh/lib/os +++ b/zsh/lib/os @@ -12,6 +12,11 @@ function is_linux { if is_mac; then + # Check to see if the (mac) app exists + function app_exists { + [ -d /Applications/"$1" ] || [ -e /Applications/"$1".app ] || [ -e ~/Applications/"$1".app ] + } + if command_exists brew; then function pkg_install() {