mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
Merge pull request #200 from Installomator/Change-in-finding-installed-apps
Look in /Application and Utilities first
This commit is contained in:
@@ -337,15 +337,16 @@ getAppVersion() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# get all apps matching name
|
||||
applist=$(mdfind "kind:application $appName" -0 )
|
||||
if [[ $applist = "" ]]; then
|
||||
printlog "Spotlight not returning any app, trying manually in /Applications."
|
||||
if [[ -d "/Applications/$appName" ]]; then
|
||||
applist="/Applications/$appName"
|
||||
fi
|
||||
# get app from /Applications or find using Spotify
|
||||
if [[ -d "/Applications/$appName" ]]; then
|
||||
applist="/Applications/$appName"
|
||||
elif [[ -d "/Applications/Utilities/$appName" ]]; then
|
||||
applist="/Applications/Utilities/$appName"
|
||||
else
|
||||
applist=$(mdfind "kind:application $appName" -0 )
|
||||
fi
|
||||
|
||||
printlog "App(s) found: ${applist}"
|
||||
|
||||
appPathArray=( ${(0)applist} )
|
||||
|
||||
if [[ ${#appPathArray} -gt 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user