mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
installerTool implemented
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
## v0.8
|
||||
|
||||
- New variables for labels that should be installaed using CLI: `CLIInstaller` and `CLIArguments`. See the label __adobecreativeclouddesktop__ to see it's use.
|
||||
- New variables for labels that should be installaed using CLI: `CLIInstaller` and `CLIArguments`. If the installer app is named differently thatn the installed app, then the variable `installerTool` can be use to name the app that should be located in the DMG or zip. See the label __adobecreativeclouddesktop__ to see it’s use.
|
||||
|
||||
## v0.7
|
||||
|
||||
|
||||
@@ -380,12 +380,16 @@ Depending on the application or pkg there are a few more variables you can or ne
|
||||
- `CLIInstaller`:
|
||||
- `CLIArguments`:
|
||||
If the downloaded dmg is actually an installer that we can call using CLI, we can use these two variables for what to call.
|
||||
We need to define `name` for the installed app (to be version checked), as well as `appName` for the installer binary. So Installomator will add the path to the folder of this binary, and it will be called like this:
|
||||
We need to define `name` for the installed app (to be version checked), as well as `installerTool` for the installer app (if named differently that `name`. Installomator will add the path to the folder/disk image with the binary, and it will be called like this:
|
||||
`$CLIInstaller $CLIArguments`
|
||||
So for most installations `CLIInstaller` should contain the `appName` for the CLI call (if it’s the same).
|
||||
For most installations `CLIInstaller` should contain the `installerTool` for the CLI call (if it’s the same).
|
||||
We can support a whole range of other software titles by implementing this.
|
||||
See label adobecreativeclouddesktop.
|
||||
|
||||
- `installerTool`:
|
||||
Introduced as part of `CLIInstaller`. If the installer in the DMG or ZIP is named differently than the installed app, then this variable can be used to name the installer that should be located after mounting/expanding the downloaded archive.
|
||||
See label adobecreativeclouddesktop
|
||||
|
||||
### Configuration from Arguments
|
||||
|
||||
You can provide a configuration variable, such as `DEBUG` or `NOTIFY` as an argument in the form `VAR=value`. For example:
|
||||
|
||||
@@ -342,7 +342,7 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
||||
# versioncheck
|
||||
# credit: Søren Theilgaard (@theilgaard)
|
||||
appNewVersion=$(defaults read $appPath/Contents/Info.plist $versionKey)
|
||||
if [[ $appversion == $appNewVersion ]]; then
|
||||
if [[ -n $appNewVersion && $appversion == $appNewVersion ]]; then
|
||||
printlog "Downloaded version of $name is $appNewVersion, same as installed."
|
||||
if [[ $INSTALL != "force" ]]; then
|
||||
message="$name, version $appNewVersion, is the latest version."
|
||||
@@ -428,11 +428,7 @@ mountDMG() {
|
||||
|
||||
installFromDMG() {
|
||||
mountDMG
|
||||
if [[ -z $CLIInstaller ]]; then
|
||||
installAppWithPath "$dmgmount/$appName"
|
||||
else
|
||||
installAppWithPath "$dmgmount/$CLIInstaller"
|
||||
fi
|
||||
}
|
||||
|
||||
installFromPKG() {
|
||||
|
||||
@@ -205,14 +205,20 @@ REOPEN="yes"
|
||||
#
|
||||
# - CLIInstaller:
|
||||
# - CLIArguments:
|
||||
# If the downloaded dmg is actually an installer that we can call using CLI,
|
||||
# we can use these two variables for what to call.
|
||||
# We need to define `name` for the installed app (to be version checked), as well
|
||||
# as `appName` for the installer binary. So Installomator will add the path to the
|
||||
# folder of this binary, and it will be called like this:
|
||||
# $CLIInstaller $CLIArguments
|
||||
# So for most installations `CLIInstaller` should contain the `appName` for the CLI
|
||||
# call (if it’s the same).
|
||||
# If the downloaded dmg is actually an installer that we can call using CLI, we can
|
||||
# use these two variables for what to call.
|
||||
# We need to define `name` for the installed app (to be version checked), as well as
|
||||
# `installerTool` for the installer app (if named differently that `name`. Installomator
|
||||
# will add the path to the folder/disk image with the binary, and it will be called like this:
|
||||
`$CLIInstaller $CLIArguments`
|
||||
# For most installations `CLIInstaller` should contain the `installerTool` for the CLI call
|
||||
# (if it’s the same).
|
||||
# We can support a whole range of other software titles by implementing this.
|
||||
# See label adobecreativeclouddesktop
|
||||
#
|
||||
# - installerTool:
|
||||
# Introduced as part of `CLIInstaller`. If the installer in the DMG or ZIP is named
|
||||
# differently than the installed app, then this variable can be used to name the
|
||||
# installer that should be located after mounting/expanding the downloaded archive.
|
||||
# See label adobecreativeclouddesktop
|
||||
#
|
||||
|
||||
@@ -9,6 +9,7 @@ adobecreativeclouddesktop)
|
||||
fi
|
||||
#downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*dmg" | head -1)
|
||||
appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2)
|
||||
installerTool="Install.app"
|
||||
CLIInstaller="Install.app/Contents/MacOS/Install"
|
||||
CLIArguments=(--mode=silent)
|
||||
expectedTeamID="JQ525L2MZD"
|
||||
|
||||
11
fragments/labels/forticlientvpn.sh
Normal file
11
fragments/labels/forticlientvpn.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
forticlientvpn)
|
||||
name="FortiClientUpdate"
|
||||
type="dmg"
|
||||
# This version of the installer only downloads another installer
|
||||
downloadURL="https://links.fortinet.com/forticlient/mac/vpnagent"
|
||||
appNewVersion=""
|
||||
installerTool="FortiClientUpdate.app"
|
||||
CLIInstaller="FortiClientUpdate.app/Contents/MacOS/FortiClientUpdate"
|
||||
CLIArguments=( )
|
||||
expectedTeamID="AH4XFXJ7DK"
|
||||
;;
|
||||
@@ -202,6 +202,12 @@ if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
||||
displaynotification "Installing $name" "Installation in progress …"
|
||||
fi
|
||||
|
||||
if [ -n "$installerTool" ]; then
|
||||
# installerTool defined, and we use that for installation
|
||||
printlog "installerTool used: $installerTool"
|
||||
appName="$installerTool"
|
||||
fi
|
||||
|
||||
case $type in
|
||||
dmg)
|
||||
installFromDMG
|
||||
|
||||
Reference in New Issue
Block a user