mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-20 13:20:52 +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.
|
- 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.
|
- Script `buildCaseStatement.sh` to help with creating labels have been improved.
|
||||||
- Fixed a bug in a variable name that prevented updateTool to be used
|
- 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
|
## v0.4 - 2020-10-19
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ INSTALL=""
|
|||||||
# - pkgInDmg
|
# - pkgInDmg
|
||||||
# - pkgInZip
|
# - pkgInZip
|
||||||
# - appInDmgInZip
|
# - appInDmgInZip
|
||||||
|
# - updateronly This last one is for labels that should only run an updateTool (see below)
|
||||||
#
|
#
|
||||||
# - packageID: (optional)
|
# - packageID: (optional)
|
||||||
# The package ID of a pkg
|
# The package ID of a pkg
|
||||||
@@ -3088,6 +3089,8 @@ if [ -z "$archiveName" ]; then
|
|||||||
*InZip)
|
*InZip)
|
||||||
archiveName="${name}.zip"
|
archiveName="${name}.zip"
|
||||||
;;
|
;;
|
||||||
|
updateronly)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
printlog "Cannot handle type $type"
|
printlog "Cannot handle type $type"
|
||||||
cleanupAndExit 99
|
cleanupAndExit 99
|
||||||
@@ -3108,6 +3111,8 @@ if [ -z "$targetDir" ]; then
|
|||||||
pkg*)
|
pkg*)
|
||||||
targetDir="/"
|
targetDir="/"
|
||||||
;;
|
;;
|
||||||
|
updateronly)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
printlog "Cannot handle type $type"
|
printlog "Cannot handle type $type"
|
||||||
cleanupAndExit 99
|
cleanupAndExit 99
|
||||||
@@ -3133,19 +3138,21 @@ fi
|
|||||||
printlog "Changing directory to $tmpDir"
|
printlog "Changing directory to $tmpDir"
|
||||||
if ! cd "$tmpDir"; then
|
if ! cd "$tmpDir"; then
|
||||||
printlog "error changing directory $tmpDir"
|
printlog "error changing directory $tmpDir"
|
||||||
#rm -Rf "$tmpDir"
|
|
||||||
cleanupAndExit 1
|
cleanupAndExit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# MARK: check if this is an Update and we can use updateTool
|
# MARK: check if this is an Update and we can use updateTool
|
||||||
getAppVersion
|
getAppVersion
|
||||||
printlog "appversion: $appversion"
|
printlog "appversion: $appversion"
|
||||||
if [[ -n $appversion && -n "$updateTool" ]]; then
|
if [[ (-n $appversion && -n "$updateTool") || "$type" == "updateronly" ]]; then
|
||||||
printlog "appversion & updateTool"
|
printlog "appversion & updateTool"
|
||||||
if [[ $DEBUG -eq 0 ]]; then
|
if [[ $DEBUG -eq 0 ]]; then
|
||||||
if runUpdateTool; then
|
if runUpdateTool; then
|
||||||
finishing
|
finishing
|
||||||
cleanupAndExit 0
|
cleanupAndExit 0
|
||||||
|
elif [[ $type == "updateronly" ]];then
|
||||||
|
printlog "type is $type so we end here."
|
||||||
|
cleanupAndExit 0
|
||||||
fi # otherwise continue
|
fi # otherwise continue
|
||||||
else
|
else
|
||||||
printlog "DEBUG mode enabled, not running update tool"
|
printlog "DEBUG mode enabled, not running update tool"
|
||||||
|
|||||||
Reference in New Issue
Block a user