Look in /Application and Utilities first

First /Applications, then /Applications/Utilities, and then Spotlight. Maybe we should be prepared that DEPnotify should be installed in Utilities, so `customDestination="/Applications/Utilities/"`could ba a thing.
This commit is contained in:
Søren Theilgaard
2021-06-27 13:26:54 +02:00
parent 0185827256
commit 84c551ee31

View File

@@ -337,14 +337,15 @@ getAppVersion() {
fi fi
fi fi
# get all apps matching name # get app from /Applications or find using Spotify
applist=$(mdfind "kind:application $appName" -0 )
if [[ $applist = "" ]]; then
printlog "Spotlight not returning any app, trying manually in /Applications."
if [[ -d "/Applications/$appName" ]]; then if [[ -d "/Applications/$appName" ]]; then
applist="/Applications/$appName" applist="/Applications/$appName"
elif [[ -d "/Applications/Utilities/$appName" ]]; then
applist="/Applications/Utilities/$appName"
else
applist=$(mdfind "kind:application $appName" -0 )
fi fi
fi printlog "App(s) found: ${applist}"
appPathArray=( ${(0)applist} ) appPathArray=( ${(0)applist} )