mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
v0.5 type updateronly
A label can now be of type "updateronly" if only updateTool should be used
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
- If your MDM is not Jamf Pro, and you need the script to be installed locally on your managed machines, then take a look at [Theiles fork](https://github.com/Theile/Installomator/). This fork can be called from the MDM using a small script.
|
||||
- Script `buildCaseStatement.sh` to help with creating labels have been improved.
|
||||
- Fixed a bug in a variable name that prevented updateTool to be used
|
||||
- added `type` variable for value `"updateronly"` if the label should only run an updater tool.
|
||||
|
||||
|
||||
## v0.4 - 2020-10-19
|
||||
|
||||
@@ -90,6 +90,7 @@ INSTALL=""
|
||||
# - pkgInDmg
|
||||
# - pkgInZip
|
||||
# - appInDmgInZip
|
||||
# - updateronly This last one is for labels that should only run an updateTool (see below)
|
||||
#
|
||||
# - packageID: (optional)
|
||||
# The package ID of a pkg
|
||||
@@ -3088,6 +3089,8 @@ if [ -z "$archiveName" ]; then
|
||||
*InZip)
|
||||
archiveName="${name}.zip"
|
||||
;;
|
||||
updateronly)
|
||||
;;
|
||||
*)
|
||||
printlog "Cannot handle type $type"
|
||||
cleanupAndExit 99
|
||||
@@ -3108,6 +3111,8 @@ if [ -z "$targetDir" ]; then
|
||||
pkg*)
|
||||
targetDir="/"
|
||||
;;
|
||||
updateronly)
|
||||
;;
|
||||
*)
|
||||
printlog "Cannot handle type $type"
|
||||
cleanupAndExit 99
|
||||
@@ -3133,19 +3138,21 @@ fi
|
||||
printlog "Changing directory to $tmpDir"
|
||||
if ! cd "$tmpDir"; then
|
||||
printlog "error changing directory $tmpDir"
|
||||
#rm -Rf "$tmpDir"
|
||||
cleanupAndExit 1
|
||||
fi
|
||||
|
||||
# MARK: check if this is an Update and we can use updateTool
|
||||
getAppVersion
|
||||
printlog "appversion: $appversion"
|
||||
if [[ -n $appversion && -n "$updateTool" ]]; then
|
||||
if [[ (-n $appversion && -n "$updateTool") || "$type" == "updateronly" ]]; then
|
||||
printlog "appversion & updateTool"
|
||||
if [[ $DEBUG -eq 0 ]]; then
|
||||
if runUpdateTool; then
|
||||
finishing
|
||||
cleanupAndExit 0
|
||||
elif [[ $type == "updateronly" ]];then
|
||||
printlog "type is $type so we end here."
|
||||
cleanupAndExit 0
|
||||
fi # otherwise continue
|
||||
else
|
||||
printlog "DEBUG mode enabled, not running update tool"
|
||||
|
||||
Reference in New Issue
Block a user