mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-20 05:10:58 +00:00
updated getAppVersion, closes #39
This commit is contained in:
@@ -777,6 +777,7 @@ egnyte)
|
|||||||
expectedTeamID="FELUD555VC"
|
expectedTeamID="FELUD555VC"
|
||||||
BLOCKING_PROCESS_ACTION=ignore
|
BLOCKING_PROCESS_ACTION=ignore
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# MARK: add new labels above here
|
# MARK: add new labels above here
|
||||||
|
|
||||||
# NOTE: Packages is signed but _not_ notarized, so spctl will reject it
|
# NOTE: Packages is signed but _not_ notarized, so spctl will reject it
|
||||||
@@ -1021,7 +1022,14 @@ displaynotification() { # $1: message $2: title
|
|||||||
|
|
||||||
getAppVersion() {
|
getAppVersion() {
|
||||||
# get all apps matching name
|
# get all apps matching name
|
||||||
applist=$(mdfind "kMDItemFSName == '$appName' && kMDItemKind == 'Application'" -0 )
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
appPathArray=( ${(0)applist} )
|
appPathArray=( ${(0)applist} )
|
||||||
|
|
||||||
if [[ ${#appPathArray} -gt 0 ]]; then
|
if [[ ${#appPathArray} -gt 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user