mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-24 21:03:50 +00:00
v0.4.24
This commit is contained in:
@@ -9,7 +9,7 @@ label="" # if no label is sent to the script, this will be used
|
|||||||
# inspired by the download scripts from William Smith and Sander Schram
|
# inspired by the download scripts from William Smith and Sander Schram
|
||||||
# with additional ideas and contribution from Isaac Ordonez, Mann consulting
|
# with additional ideas and contribution from Isaac Ordonez, Mann consulting
|
||||||
|
|
||||||
VERSION='0.4.23'
|
VERSION='0.4.24'
|
||||||
VERSIONDATE='2021-??-??'
|
VERSIONDATE='2021-??-??'
|
||||||
|
|
||||||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||||
@@ -423,7 +423,10 @@ reopenClosedProcess() {
|
|||||||
|
|
||||||
if [[ $appClosed == 1 ]]; then
|
if [[ $appClosed == 1 ]]; then
|
||||||
printlog "Telling app $name to open"
|
printlog "Telling app $name to open"
|
||||||
runAsUser osascript -e "tell app \"$name\" to open"
|
#runAsUser osascript -e "tell app \"$name\" to open"
|
||||||
|
runAsUser open -a "${name}"
|
||||||
|
processuser=$(ps aux | grep -i "${name}")
|
||||||
|
printlog "Reopened ${name} as $processuser"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -552,7 +555,8 @@ installFromPKG() {
|
|||||||
if [[ $packageID != "" && $appversion != "" ]]; then
|
if [[ $packageID != "" && $appversion != "" ]]; then
|
||||||
printlog "Checking package version."
|
printlog "Checking package version."
|
||||||
pkgutil --expand "$archiveName" "$archiveName"_pkg
|
pkgutil --expand "$archiveName" "$archiveName"_pkg
|
||||||
appNewVersion=$(cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null | grep "$packageID" | tr ' ' '\n' | grep version | sed -E 's/.*\"([0-9.]*)\".*/\1/g')
|
#printlog "$(cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null)"
|
||||||
|
appNewVersion=$(cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null | grep -i "$packageID" | tr ' ' '\n' | grep -i version | cut -d \" -f 2) #sed -E 's/.*\"([0-9.]*)\".*/\1/g'
|
||||||
rm -r "$archiveName"_pkg
|
rm -r "$archiveName"_pkg
|
||||||
printlog "Downloaded package $packageID version $appNewVersion"
|
printlog "Downloaded package $packageID version $appNewVersion"
|
||||||
if [[ $appversion == $appNewVersion ]]; then
|
if [[ $appversion == $appNewVersion ]]; then
|
||||||
@@ -2821,6 +2825,10 @@ case $LOGO in
|
|||||||
# Mosyle Manager (education)
|
# Mosyle Manager (education)
|
||||||
LOGO="/Applications/Manager.app/Contents/Resources/AppIcon.icns"
|
LOGO="/Applications/Manager.app/Contents/Resources/AppIcon.icns"
|
||||||
;;
|
;;
|
||||||
|
addigy)
|
||||||
|
# Addigy
|
||||||
|
LOGO="/Library/Addigy/macmanage/MacManage.app/Contents/Resources/atom.icns"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
if [[ ! -a "${LOGO}" ]]; then
|
if [[ ! -a "${LOGO}" ]]; then
|
||||||
if [[ $(sw_vers -buildVersion) > "19" ]]; then
|
if [[ $(sw_vers -buildVersion) > "19" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user