mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-27 21:04:02 +00:00
Update functions.sh
This commit is contained in:
@@ -225,25 +225,29 @@ getAppVersion() {
|
|||||||
applist="$targetDir/$appName"
|
applist="$targetDir/$appName"
|
||||||
elif [[ -d "/Applications/$appName" ]]; then
|
elif [[ -d "/Applications/$appName" ]]; then
|
||||||
applist="/Applications/$appName"
|
applist="/Applications/$appName"
|
||||||
if [[ $type =~ '^(dmg|zip|tbz|app.*)$' ]]; then
|
# if [[ $type =~ '^(dmg|zip|tbz|app.*)$' ]]; then
|
||||||
targetDir="/Applications"
|
# targetDir="/Applications"
|
||||||
fi
|
# fi
|
||||||
elif [[ -d "/Applications/Utilities/$appName" ]]; then
|
elif [[ -d "/Applications/Utilities/$appName" ]]; then
|
||||||
applist="/Applications/Utilities/$appName"
|
applist="/Applications/Utilities/$appName"
|
||||||
if [[ $type =~ '^(dmg|zip|tbz|app.*)$' ]]; then
|
# if [[ $type =~ '^(dmg|zip|tbz|app.*)$' ]]; then
|
||||||
targetDir="/Applications/Utilities"
|
# targetDir="/Applications/Utilities"
|
||||||
fi
|
# fi
|
||||||
#else
|
else
|
||||||
# applist=$(mdfind "kind:application $appName" -0 )
|
# applist=$(mdfind "kind:application $appName" -0 )
|
||||||
|
printlog "name: $name, appName: $appName"
|
||||||
|
applist=$(mdfind "kind:application AND name:$name" -0 )
|
||||||
|
# printlog "App(s) found: ${applist}" DEBUG
|
||||||
|
# applist=$(mdfind "kind:application AND name:$appName" -0 )
|
||||||
fi
|
fi
|
||||||
if [[ -z applist ]]; then
|
if [[ -z applist ]]; then
|
||||||
printlog "No previous app found" DEBUG
|
printlog "No previous app found" DEBUG
|
||||||
else
|
else
|
||||||
printlog "App(s) found: ${applist}" DEBUG
|
printlog "App(s) found: ${applist}" DEBUG
|
||||||
fi
|
fi
|
||||||
if [[ $type =~ '^(dmg|zip|tbz|app.*)$' ]]; then
|
# if [[ $type =~ '^(dmg|zip|tbz|app.*)$' ]]; then
|
||||||
printlog "targetDir for installation: $targetDir" INFO
|
# printlog "targetDir for installation: $targetDir" INFO
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
appPathArray=( ${(0)applist} )
|
appPathArray=( ${(0)applist} )
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user