mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
Added a bit to explanation of archiveName variable. ``` sudo /Users/st/Documents/GitHub/Installomator/utils/assemble.sh -r macports DEBUG=0 INSTALL=force Password: 2021-11-02 09:55:12 macports setting variable from argument DEBUG=0 2021-11-02 09:55:12 macports setting variable from argument INSTALL=force 2021-11-02 09:55:12 macports ################## Start Installomator v. 0.8.0 2021-11-02 09:55:12 macports ################## macports 2021-11-02 09:55:13 macports BLOCKING_PROCESS_ACTION=tell_user 2021-11-02 09:55:13 macports NOTIFY=success 2021-11-02 09:55:14 macports LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2021-11-02 09:55:14 macports no blocking processes defined, using MacPorts as default 2021-11-02 09:55:14 macports Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.4KnOGDkl 2021-11-02 09:55:14 macports Custom App Version detection is used, found 2.7.1 2021-11-02 09:55:14 macports appversion: 2.7.1 2021-11-02 09:55:14 macports Latest version of MacPorts is 2.7.1 2021-11-02 09:55:14 macports There is no newer version available. 2021-11-02 09:55:14 macports Using force to install anyway. Not using updateTool. 2021-11-02 09:55:14 macports Downloading https://github.com/macports/macports-base/releases/download/v2.7.1/MacPorts-2.7.1-12-Monterey.pkg to Monterey.pkg 2021-11-02 09:55:15 macports no more blocking processes, continue with update 2021-11-02 09:55:15 macports Installing MacPorts 2021-11-02 09:55:16 macports Verifying: Monterey.pkg 2021-11-02 09:55:16 macports Team ID: QTA3A3B7F3 (expected: QTA3A3B7F3 ) 2021-11-02 09:55:16 macports Installing Monterey.pkg to / installer: Package name is MacPorts installer: Upgrading at base path / installer: The upgrade was successful. 2021-11-02 09:56:03 macports Finishing… 2021-11-02 09:56:13 macports Custom App Version detection is used, found 2.7.1 2021-11-02 09:56:13 macports Installed MacPorts, version 2.7.1 2021-11-02 09:56:13 macports notifying 2021-11-02 09:56:14 macports Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.4KnOGDkl 2021-11-02 09:56:14 macports App not closed, so no reopen. 2021-11-02 09:56:14 macports ################## End Installomator, exit code 0 ```
206 lines
7.4 KiB
Bash
206 lines
7.4 KiB
Bash
#!/bin/zsh
|
||
label="" # if no label is sent to the script, this will be used
|
||
|
||
# Installomator
|
||
#
|
||
# Downloads and installs Applications
|
||
# 2020-2021 Installomator
|
||
#
|
||
# inspired by the download scripts from William Smith and Sander Schram
|
||
#
|
||
# Contributers:
|
||
# Armin Briegel - @scriptingosx
|
||
# Isaac Ordonez - @issacatmann
|
||
# Søren Theilgaard - @Theile
|
||
# Adam Codega - @acodega
|
||
#
|
||
# with contributions from many others
|
||
|
||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||
|
||
# NOTE: adjust these variables:
|
||
|
||
# set to 0 for production, 1 for debugging
|
||
# while debugging, items will be downloaded to the parent directory of this script
|
||
# also no actual installation will be performed
|
||
DEBUG=1
|
||
|
||
# notify behavior
|
||
NOTIFY=success
|
||
# options:
|
||
# - success notify the user on success
|
||
# - silent no notifications
|
||
# - all all notifications (great for Self Service installation)
|
||
|
||
|
||
# behavior when blocking processes are found
|
||
BLOCKING_PROCESS_ACTION=tell_user
|
||
# options:
|
||
# - ignore continue even when blocking processes are found
|
||
# - quit app will be told to quit nicely, if running
|
||
# - quit_kill told to quit twice, then it will be killed
|
||
# Could be great for service apps, if they do not respawn
|
||
# - silent_fail exit script without prompt or installation
|
||
# - prompt_user show a user dialog for each blocking process found
|
||
# abort after three attempts to quit
|
||
# (only if user accepts to quit the apps, otherwise
|
||
# the update is cancelled).
|
||
# - prompt_user_then_kill
|
||
# show a user dialog for each blocking process found,
|
||
# attempt to quit two times, kill the process finally
|
||
# - prompt_user_loop
|
||
# Like prompt-user, but clicking "Not Now", will just wait an hour,
|
||
# and then it will ask again.
|
||
# WARNING! It might block the MDM agent on the machine, as
|
||
# the scripts gets stuct in waiting until the hour has passed,
|
||
# possibly blocking for other management actions in this time.
|
||
# - tell_user User will be showed a notification about the important update,
|
||
# but user is only allowed to quit and continue, and then we
|
||
# ask the app to quit.
|
||
# - tell_user_then_kill
|
||
# Show dialog 2 times, and if the quitting fails, the
|
||
# blocking processes will be killed.
|
||
# - kill kill process without prompting or giving the user a chance to save
|
||
|
||
|
||
# logo-icon used in dialog boxes if app is blocking
|
||
LOGO=appstore
|
||
# options:
|
||
# - appstore Icon is Apple App Store (default)
|
||
# - jamf JAMF Pro
|
||
# - mosyleb Mosyle Business
|
||
# - mosylem Mosyle Manager (Education)
|
||
# - addigy Addigy
|
||
# path can also be set in the command call, and if file exists, it will be used.
|
||
# Like 'LOGO="/System/Applications/App\ Store.app/Contents/Resources/AppIcon.icns"'
|
||
# (spaces have to be escaped).
|
||
|
||
|
||
# App Store apps handling
|
||
IGNORE_APP_STORE_APPS=no
|
||
# options:
|
||
# - no If installed app is from App Store (which include VPP installed apps)
|
||
# it will not be touched, no matter it's version (default)
|
||
# - yes Replace App Store (and VPP) version of app and handle future
|
||
# updates using Installomator, even if latest version.
|
||
# Shouldn’t give any problems for the user in most cases.
|
||
# Known bad example: Slack will loose all settings.
|
||
|
||
|
||
# install behavior
|
||
INSTALL=""
|
||
# options:
|
||
# - When not set, software will only be installed
|
||
# if it is newer/different in version
|
||
# - force Install even if it’s the same version
|
||
|
||
|
||
# Re-opening of closed app
|
||
REOPEN="yes"
|
||
# options:
|
||
# - yes App wil be reopened if it was closed
|
||
# - no App not reopened
|
||
|
||
|
||
# NOTE: How labels work
|
||
|
||
# Each workflow label needs to be listed in the case statement below.
|
||
# for each label these variables can be set:
|
||
#
|
||
# - name: (required)
|
||
# Name of the installed app.
|
||
# This is used to derive many of the other variables.
|
||
#
|
||
# - type: (required)
|
||
# The type of the installation. Possible values:
|
||
# - dmg
|
||
# - pkg
|
||
# - zip
|
||
# - tbz
|
||
# - 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
|
||
# If given, will be used to find version of installed software, instead of searching for an app.
|
||
# Usefull if a pkg does not install an app.
|
||
# See label installomator_st
|
||
#
|
||
# - downloadURL: (required)
|
||
# URL to download the dmg.
|
||
# Can be generated with a series of commands (see BBEdit for an example).
|
||
#
|
||
# - appNewVersion: (optional)
|
||
# Version of the downloaded software.
|
||
# If given, it will be compared to installed version, to see if download is different.
|
||
# It does not check for newer or not, only different.
|
||
#
|
||
# - versionKey: (optional)
|
||
# How we get version number from app. Possible values:
|
||
# - CFBundleShortVersionString
|
||
# - CFBundleVersion
|
||
# Not all software titles uses fields the same.
|
||
# See Opera label.
|
||
#
|
||
# - appCustomVersion(){}: (optional function)
|
||
# This function can be added to your label, if a specific custom
|
||
# mechanism hs to be used for getting the installed version.
|
||
# See labels zulujdk11, zulujdk13, zulujdk15
|
||
#
|
||
# - expectedTeamID: (required)
|
||
# 10-digit developer team ID.
|
||
# Obtain the team ID by running:
|
||
#
|
||
# - Applications (in dmgs or zips)
|
||
# spctl -a -vv /Applications/BBEdit.app
|
||
#
|
||
# - Pkgs
|
||
# spctl -a -vv -t install ~/Downloads/desktoppr-0.2.pkg
|
||
#
|
||
# The team ID is the ten-digit ID at the end of the line starting with 'origin='
|
||
#
|
||
# - archiveName: (optional)
|
||
# The name of the downloaded file.
|
||
# When not given the archiveName is derived from the $name.
|
||
# Note: This has to be defined BEFORE calling downloadURLFromGit or
|
||
# versionFromGit functions in the label.
|
||
#
|
||
# - appName: (optional)
|
||
# File name of the app bundle in the dmg to verify and copy (include .app).
|
||
# When not given, the appName is derived from the $name.
|
||
#
|
||
# - targetDir: (optional)
|
||
# dmg or zip:
|
||
# Applications will be copied to this directory.
|
||
# Default value is '/Applications' for dmg and zip installations.
|
||
# pkg:
|
||
# targetDir is used as the install-location. Default is '/'.
|
||
#
|
||
# - blockingProcesses: (optional)
|
||
# Array of process names that will block the installation or update.
|
||
# If no blockingProcesses array is given the default will be:
|
||
# blockingProcesses=( $name )
|
||
# When a package contains multiple applications, _all_ should be listed, e.g:
|
||
# blockingProcesses=( "Keynote" "Pages" "Numbers" )
|
||
# When a workflow has no blocking processes, use
|
||
# blockingProcesses=( NONE )
|
||
#
|
||
# - pkgName: (optional, only used for pkgInDmg, dmgInZip, and appInDmgInZip)
|
||
# File name of the pkg/dmg file _inside_ the dmg or zip
|
||
# When not given the pkgName is derived from the $name
|
||
#
|
||
# - updateTool:
|
||
# - updateToolArguments:
|
||
# When Installomator detects an existing installation of the application,
|
||
# and the updateTool variable is set
|
||
# $updateTool $updateArguments
|
||
# Will be run instead of of downloading and installing a complete new version.
|
||
# Use this when the updateTool does differential and optimized downloads.
|
||
# e.g. msupdate
|
||
#
|
||
# - updateToolRunAsCurrentUser:
|
||
# When this variable is set (any value), $updateTool will be run as the current user.
|
||
#
|