mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
Merge branch 'dev' into LSMinimumSystemVersion-check
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
- We have moved the root check to the beginning of the script, and improved DEBUG handling with two different modes. `DEBUG=0` is still for production, and `1` is still for the DEBUG we previously knew downloading to the directory it is running from, but `2` will download to temporary folder, will detect updates, but will not install anything, but it will notify the user (almost as running the script without root before).
|
||||
- `LSMinimumSystemVersion` will now be honered, if the `Info.plist` in the app is specifying this. That means that an app that has this parameter in that file and it shows that the app requires a newer version of the OS than is currently installed, then we will not install it.
|
||||
- New variable `RETURN_LABEL_NAME`. If given the value `1`, like `RETURN_LABEL_NAME=1` then Installomator only returns the name of the label. It makes for a better user friendly message for displaying in DEPNotify if that is integrated.
|
||||
- Changed logic if `IGNORE_APP_STORE_APPS=yes`. Before this version a label like `microsoftonedrive` that was installed from App Store, and that we want to replace with the “ordinary” version, Installomator would still use `updateTool`, even though `IGNORE_APP_STORE_APPS=yes`. So we would have to have `INSTALL=force` in order to have the app replaced, as `updateTool` would be used. But now if `IGNORE_APP_STORE_APPS=yes` then `updateTool` will be not set, and the App Store app will be replaced. BUT if the installed software was not from App Store, then `updateTool` will not be used, and it would be a kind of a forced install (in the example of `microsoftonedrive`), except if the version is the same (where installation is skipped).
|
||||
- Added variable `SYSTEMOWNER` that is used when copying files when installing. Default `0` is to change owner of the app to the current user on the Mac, like this user was installing this app themselves. When using `1` we will put “root:wheel” on the app, which can be useful for shared machines.
|
||||
|
||||
## v8.0
|
||||
|
||||
|
||||
@@ -328,6 +328,7 @@ textmate
|
||||
theunarchiver
|
||||
things
|
||||
thunderbird
|
||||
tidal
|
||||
toggltrack
|
||||
tom4aconverter
|
||||
torbrowser
|
||||
|
||||
@@ -262,6 +262,12 @@ __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.
|
||||
|
||||
### Owner of copied apps
|
||||
Default is `SYSTEMOWNER=0`
|
||||
__options:__
|
||||
- `0`: Current user will be owner of copied apps, just like if they installed it themselves (default).
|
||||
- `1`: root:wheel will be set on the copied app. Useful for shared machines.
|
||||
|
||||
### Install behavior (force installation)
|
||||
|
||||
Since we now make a version checking, and only installs the software if the version is different, an `INSTALL` variable can be used to force the installation:
|
||||
|
||||
@@ -18,6 +18,10 @@ cleanupAndExit() { # $1 = exit code, $2 message
|
||||
# If we closed any processes, reopen the app again
|
||||
reopenClosedProcess
|
||||
printlog "################## End Installomator, exit code $1 \n\n"
|
||||
# if label is wrong and we wanted name of the label, then return ##################
|
||||
if [[ $RETURN_LABEL_NAME -eq 1 ]]; then
|
||||
echo "#"
|
||||
fi
|
||||
exit "$1"
|
||||
}
|
||||
|
||||
@@ -406,11 +410,12 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
||||
fi
|
||||
|
||||
# set ownership to current user
|
||||
if [ "$currentUser" != "loginwindow" ]; then
|
||||
if [[ "$currentUser" != "loginwindow" && $SYSTEMOWNER -ne 1 ]]; then
|
||||
printlog "Changing owner to $currentUser"
|
||||
chown -R "$currentUser" "$targetDir/$appName"
|
||||
else
|
||||
printlog "No user logged in, not changing user"
|
||||
printlog "No user logged in or SYSTEMOWNER=1, setting owner to root:wheel"
|
||||
chown -R root:wheel "$targetDir/$appName"
|
||||
fi
|
||||
|
||||
elif [[ ! -z $CLIInstaller ]]; then
|
||||
|
||||
@@ -88,6 +88,13 @@ IGNORE_APP_STORE_APPS=no
|
||||
# Shouldn’t give any problems for the user in most cases.
|
||||
# Known bad example: Slack will loose all settings.
|
||||
|
||||
# Owner of copied apps
|
||||
SYSTEMOWNER=0
|
||||
# options:
|
||||
# - 0 Current user will be owner of copied apps, just like if they
|
||||
# installed it themselves (default).
|
||||
# - 1 root:wheel will be set on the copied app.
|
||||
# Useful for shared machines.
|
||||
|
||||
# install behavior
|
||||
INSTALL=""
|
||||
@@ -103,6 +110,14 @@ REOPEN="yes"
|
||||
# - yes App wil be reopened if it was closed
|
||||
# - no App not reopened
|
||||
|
||||
# Only let Installomator return the name of the label
|
||||
# RETURN_LABEL_NAME=0
|
||||
# options:
|
||||
# - 1 Installomator will return the name of the label and exit, so last line of
|
||||
# output will be that name. When Installomator is locally installed and we
|
||||
# use DEPNotify, then DEPNotify can present a more nice name to the user,
|
||||
# instead of just the label name.
|
||||
|
||||
|
||||
# NOTE: How labels work
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@ applenyfonts)
|
||||
type="pkgInDmg"
|
||||
downloadURL="https://devimages-cdn.apple.com/design/resources/download/NY.dmg"
|
||||
packageID="com.apple.pkg.NYFonts"
|
||||
expectedTeamID="Development Update"
|
||||
expectedTeamID="Software Update"
|
||||
;;
|
||||
|
||||
@@ -3,5 +3,5 @@ applesfcompact)
|
||||
type="pkgInDmg"
|
||||
downloadURL="https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg"
|
||||
packageID="com.apple.pkg.SanFranciscoCompact"
|
||||
expectedTeamID="Development Update"
|
||||
expectedTeamID="Software Update"
|
||||
;;
|
||||
|
||||
@@ -3,5 +3,5 @@ applesfpro)
|
||||
type="pkgInDmg"
|
||||
downloadURL="https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg"
|
||||
packageID="com.apple.pkg.SanFranciscoPro"
|
||||
expectedTeamID="Development Update"
|
||||
expectedTeamID="Software Update"
|
||||
;;
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
boxdrive)
|
||||
# credit: Isaac Ordonez, Mann consulting (@mannconsulting)
|
||||
name="Box"
|
||||
type="pkg"
|
||||
if [[ $(arch) == "arm64" ]]; then
|
||||
#Note: https://support.box.com/hc/en-us/articles/1500004479962-Box-Drive-support-on-devices-with-M1-chips
|
||||
downloadURL="https://e3.boxcdn.net/desktop/pre-releases/mac/BoxDrive.2.20.140-M1-beta.pkg"
|
||||
elif [[ $(arch) == "i386" ]]; then
|
||||
downloadURL="https://e3.boxcdn.net/box-installers/desktop/releases/mac/Box.pkg"
|
||||
fi
|
||||
expectedTeamID="M683GB7CPW"
|
||||
;;
|
||||
|
||||
7
fragments/labels/iina
Normal file
7
fragments/labels/iina
Normal file
@@ -0,0 +1,7 @@
|
||||
iina)
|
||||
name="IINA"
|
||||
type="dmg"
|
||||
downloadURL=$(downloadURLFromGit iina iina )
|
||||
appNewVersion=$(versionFromGit iina iina )
|
||||
expectedTeamID="67CQ77V27R"
|
||||
;;
|
||||
7
fragments/labels/itsycal.sh
Normal file
7
fragments/labels/itsycal.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
itsycal)
|
||||
name="Itsycal"
|
||||
type="zip"
|
||||
downloadURL=$(curl -fs https://s3.amazonaws.com/itsycal/itsycal-apple-silicon.xml | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
|
||||
appNewVersion=$(curl -fs https://s3.amazonaws.com/itsycal/itsycal-apple-silicon.xml | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
|
||||
expectedTeamID="HFT3T55WND"
|
||||
;;
|
||||
13
fragments/labels/pritunl.sh
Normal file
13
fragments/labels/pritunl.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
pritunl)
|
||||
name="Pritunl"
|
||||
type="pkgInZip"
|
||||
packageID="com.pritunl.pkg.Pritunl"
|
||||
if [[ $(arch) == "arm64" ]]; then
|
||||
archiveName="Pritunl.arm64.pkg.zip"
|
||||
elif [[ $(arch) == "i386" ]]; then
|
||||
archiveName="Pritunl.pkg.zip"
|
||||
fi
|
||||
downloadURL=$(downloadURLFromGit pritunl pritunl-client-electron)
|
||||
appNewVersion=$(versionFromGit pritunl pritunl-client-electron)
|
||||
expectedTeamID="U22BLATN63"
|
||||
;;
|
||||
8
fragments/labels/secretive.sh
Normal file
8
fragments/labels/secretive.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
secretive)
|
||||
name="Secretive"
|
||||
type="zip"
|
||||
downloadURL=$(downloadURLFromGit maxgoedjen secretive)
|
||||
appNewVersion=$(versionFromGit maxgoedjen secretive)
|
||||
expectedTeamID="Z72PRUAWF6"
|
||||
;;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
textexpander)
|
||||
name="TextExpander"
|
||||
type="dmg"
|
||||
downloadURL="https://textexpander.com/cgi-bin/redirect.pl?cmd=download&platform=osx"
|
||||
appNewVersion=$( curl -fsIL "https://textexpander.com/cgi-bin/redirect.pl?cmd=download&platform=osx" | grep -i "^location" | awk '{print $2}' | tail -1 | cut -d "_" -f2 | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p' )
|
||||
downloadURL="https://cgi.textexpander.com/cgi-bin/redirect.pl?cmd=download&platform=osx"
|
||||
appNewVersion=$( curl -fsIL "https://cgi.textexpander.com/cgi-bin/redirect.pl?cmd=download&platform=osx" | grep -i "^location" | awk '{print $2}' | tail -1 | cut -d "_" -f2 | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p' )
|
||||
expectedTeamID="7PKJ6G4DXL"
|
||||
;;
|
||||
|
||||
7
fragments/labels/tidal.sh
Normal file
7
fragments/labels/tidal.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
tidal)
|
||||
name="TIDAL"
|
||||
type="dmg"
|
||||
downloadURL="https://download.tidal.com/desktop/TIDAL.dmg"
|
||||
appNewVersion=$(curl -fs https://update.tidal.com/updates/latest\?v\=1 | cut -d '"' -f4 | sed -E 's/https.*\/TIDAL\.([0-9.]*)\.zip/\1/g')
|
||||
expectedTeamID="GK2243L7KB"
|
||||
;;
|
||||
@@ -5,6 +5,13 @@
|
||||
;;
|
||||
esac
|
||||
|
||||
# Are we only asked to return label name
|
||||
if [[ $RETURN_LABEL_NAME -eq 1 ]]; then
|
||||
printlog "Only returning label name."
|
||||
printlog "$name"
|
||||
echo "$name"
|
||||
exit
|
||||
fi
|
||||
|
||||
# MARK: application download and installation starts here
|
||||
|
||||
@@ -116,9 +123,8 @@ getAppVersion
|
||||
printlog "appversion: $appversion"
|
||||
|
||||
# MARK: Exit if new version is the same as installed version (appNewVersion specified)
|
||||
# credit: Søren Theilgaard (@theilgaard)
|
||||
if [[ $INSTALL == "force" ]]; then
|
||||
printlog "Using force to install, so not using updateTool."
|
||||
if [[ "$type" != "updateronly" && ($INSTALL == "force" || $IGNORE_APP_STORE_APPS == "yes") ]]; then
|
||||
printlog "Label is not of type “updateronly”, and it’s set to use force to install or ignoring app store apps, so not using updateTool."
|
||||
updateTool=""
|
||||
fi
|
||||
if [[ -n $appNewVersion ]]; then
|
||||
|
||||
Reference in New Issue
Block a user