mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
@@ -1,5 +1,6 @@
|
|||||||
## v0.8
|
## v0.8
|
||||||
|
|
||||||
|
- New variables for labels that should be installaed using CLI: `CLIInstaller` and `CLIArguments`. If the installer app is named differently than the installed app, then the variable `installerTool` should be use to name the app that should be located in the DMG or zip. See the label __adobecreativeclouddesktop__ to see it’s use.
|
||||||
- `buildLabel.sh` has been improved to build GitHub software labels much easier. In essense if the URL contains github.com, then it will try to find if it's the latest version or if variable `archiveName` is needed for finding the software. Also improved messaging throughout the script, as well as handling a situation where a pkg does not include a “DIstribution” file, but a “PackageInfo”.
|
- `buildLabel.sh` has been improved to build GitHub software labels much easier. In essense if the URL contains github.com, then it will try to find if it's the latest version or if variable `archiveName` is needed for finding the software. Also improved messaging throughout the script, as well as handling a situation where a pkg does not include a “DIstribution” file, but a “PackageInfo”.
|
||||||
|
|
||||||
## v0.7
|
## v0.7
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -372,11 +372,24 @@ Depending on the application or pkg there are a few more variables you can or ne
|
|||||||
`$updateTool $updateArguments`
|
`$updateTool $updateArguments`
|
||||||
Will be run instead of of downloading and installing a complete new version.
|
Will be run instead of of downloading and installing a complete new version.
|
||||||
Use this when the `updateTool` does differential and optimized downloads.
|
Use this when the `updateTool` does differential and optimized downloads.
|
||||||
e.g. `msupdate` (see microsoft installations)
|
e.g. `msupdate` (see various Microsoft installations).
|
||||||
|
|
||||||
- `updateToolRunAsCurrentUser`:
|
- `updateToolRunAsCurrentUser`:
|
||||||
When this variable is set (any value), `$updateTool` will be run as the current user. Default is unset and
|
When this variable is set (any value), `$updateTool` will be run as the current user. Default is unset and
|
||||||
|
|
||||||
|
- `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 `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
|
||||||
|
|
||||||
### Configuration from Arguments
|
### Configuration from Arguments
|
||||||
|
|
||||||
You can provide a configuration variable, such as `DEBUG` or `NOTIFY` as an argument in the form `VAR=value`. For example:
|
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
|
# versioncheck
|
||||||
# credit: Søren Theilgaard (@theilgaard)
|
# credit: Søren Theilgaard (@theilgaard)
|
||||||
appNewVersion=$(defaults read $appPath/Contents/Info.plist $versionKey)
|
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."
|
printlog "Downloaded version of $name is $appNewVersion, same as installed."
|
||||||
if [[ $INSTALL != "force" ]]; then
|
if [[ $INSTALL != "force" ]]; then
|
||||||
message="$name, version $appNewVersion, is the latest version."
|
message="$name, version $appNewVersion, is the latest version."
|
||||||
@@ -369,7 +369,9 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
|||||||
# not running as root
|
# not running as root
|
||||||
cleanupAndExit 6 "not running as root, exiting"
|
cleanupAndExit 6 "not running as root, exiting"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Test if variable CLIInstaller is set
|
||||||
|
if [[ -z $CLIInstaller ]]; then
|
||||||
# remove existing application
|
# remove existing application
|
||||||
if [ -e "$targetDir/$appName" ]; then
|
if [ -e "$targetDir/$appName" ]; then
|
||||||
printlog "Removing existing $targetDir/$appName"
|
printlog "Removing existing $targetDir/$appName"
|
||||||
@@ -382,7 +384,6 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
|||||||
cleanupAndExit 7 "Error while copying"
|
cleanupAndExit 7 "Error while copying"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# set ownership to current user
|
# set ownership to current user
|
||||||
if [ "$currentUser" != "loginwindow" ]; then
|
if [ "$currentUser" != "loginwindow" ]; then
|
||||||
printlog "Changing owner to $currentUser"
|
printlog "Changing owner to $currentUser"
|
||||||
@@ -391,6 +392,22 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
|||||||
printlog "No user logged in, not changing user"
|
printlog "No user logged in, not changing user"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
elif [[ ! -z $CLIInstaller ]]; then
|
||||||
|
mountname=$(dirname $appPath)
|
||||||
|
printlog "CLIInstaller exists, running installer command $mountname/$CLIInstaller $CLIArguments" #INFO
|
||||||
|
|
||||||
|
CLIoutput=$("$mountname/$CLIInstaller" "${CLIArguments[@]}" 2>&1)
|
||||||
|
CLIstatus=$(echo $?)
|
||||||
|
logoutput="$CLIoutput" # dedupliatelogs "$CLIoutput"
|
||||||
|
|
||||||
|
if [ $CLIstatus -ne 0 ] ; then
|
||||||
|
cleanupAndExit 3 "Error installing $mountname/$CLIInstaller $CLIArguments error:\n$logoutput" #ERROR
|
||||||
|
else
|
||||||
|
printlog "Succesfully ran $mountname/$CLIInstaller $CLIArguments"
|
||||||
|
fi
|
||||||
|
printlog "Debugging enabled, update tool output was:\n$logoutput" #DEBUG
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mountDMG() {
|
mountDMG() {
|
||||||
@@ -411,7 +428,6 @@ mountDMG() {
|
|||||||
|
|
||||||
installFromDMG() {
|
installFromDMG() {
|
||||||
mountDMG
|
mountDMG
|
||||||
|
|
||||||
installAppWithPath "$dmgmount/$appName"
|
installAppWithPath "$dmgmount/$appName"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -198,8 +198,27 @@ REOPEN="yes"
|
|||||||
# $updateTool $updateArguments
|
# $updateTool $updateArguments
|
||||||
# Will be run instead of of downloading and installing a complete new version.
|
# Will be run instead of of downloading and installing a complete new version.
|
||||||
# Use this when the updateTool does differential and optimized downloads.
|
# Use this when the updateTool does differential and optimized downloads.
|
||||||
# e.g. msupdate
|
# e.g. msupdate on various Microsoft labels
|
||||||
#
|
#
|
||||||
# - updateToolRunAsCurrentUser:
|
# - updateToolRunAsCurrentUser:
|
||||||
# When this variable is set (any value), $updateTool will be run as the current user.
|
# When this variable is set (any value), $updateTool will be run as the current user.
|
||||||
#
|
#
|
||||||
|
# - 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
|
||||||
|
# `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
|
||||||
|
#
|
||||||
|
|||||||
17
fragments/labels/adobecreativeclouddesktop.sh
Normal file
17
fragments/labels/adobecreativeclouddesktop.sh
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
adobecreativeclouddesktop)
|
||||||
|
name="Adobe Creative Cloud"
|
||||||
|
#appName="Install.app"
|
||||||
|
type="dmg"
|
||||||
|
if [[ $(arch) == "arm64" ]]; then
|
||||||
|
downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*macarm64.*dmg" | cut -d '"' -f1 | head -1)
|
||||||
|
elif [[ $(arch) == "i386" ]]; then
|
||||||
|
downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*osx10.*dmg" | cut -d '"' -f1 | head -1)
|
||||||
|
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"
|
||||||
|
Company="Adobe"
|
||||||
|
;;
|
||||||
@@ -202,6 +202,12 @@ if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
|||||||
displaynotification "Installing $name" "Installation in progress …"
|
displaynotification "Installing $name" "Installation in progress …"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$installerTool" ]; then
|
||||||
|
# installerTool defined, and we use that for installation
|
||||||
|
printlog "installerTool used: $installerTool"
|
||||||
|
appName="$installerTool"
|
||||||
|
fi
|
||||||
|
|
||||||
case $type in
|
case $type in
|
||||||
dmg)
|
dmg)
|
||||||
installFromDMG
|
installFromDMG
|
||||||
|
|||||||
Reference in New Issue
Block a user