mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-19 05:10:57 +00:00
More to curlOptions
This commit is contained in:
@@ -317,6 +317,11 @@ The URL from which to download the archive.
|
|||||||
The URL can be generated by a series of commands, for example when you need to parse an xml file for the latest URL. (See `bbedit`, `desktoppr`, or `omnigraffle` for examples.)
|
The URL can be generated by a series of commands, for example when you need to parse an xml file for the latest URL. (See `bbedit`, `desktoppr`, or `omnigraffle` for examples.)
|
||||||
Sometimes version differs between Intel and Apple Silicon versions. (See `brave`, `obsidian`, `omnidisksweeper`, or `notion`).
|
Sometimes version differs between Intel and Apple Silicon versions. (See `brave`, `obsidian`, `omnidisksweeper`, or `notion`).
|
||||||
|
|
||||||
|
- `curlOptions`: (optional)
|
||||||
|
Options to the `curl` command, needed for `curl` to be able to download the software.
|
||||||
|
Usually used for adding extra headers that some servers need in order to serve the file.
|
||||||
|
(see “mocha”-labels, for examples).
|
||||||
|
|
||||||
- `appNewVersion` (optional, but recommended):
|
- `appNewVersion` (optional, but recommended):
|
||||||
Version of the downloaded software.
|
Version of the downloaded software.
|
||||||
If given, it will be compared to installed version, to see if download is different.
|
If given, it will be compared to installed version, to see if download is different.
|
||||||
|
|||||||
@@ -149,6 +149,11 @@ REOPEN="yes"
|
|||||||
# URL to download the dmg.
|
# URL to download the dmg.
|
||||||
# Can be generated with a series of commands (see BBEdit for an example).
|
# Can be generated with a series of commands (see BBEdit for an example).
|
||||||
#
|
#
|
||||||
|
# - curlOptions: (optional)
|
||||||
|
# Options to the curl command, needed for curl to be able to download the software.
|
||||||
|
# Usually used for adding extra headers that some servers need in order to serve the file.
|
||||||
|
# (see “mocha”-labels, for examples).
|
||||||
|
#
|
||||||
# - appNewVersion: (optional)
|
# - appNewVersion: (optional)
|
||||||
# Version of the downloaded software.
|
# Version of the downloaded software.
|
||||||
# If given, it will be compared to the installed version, to see if the download is different.
|
# If given, it will be compared to the installed version, to see if the download is different.
|
||||||
|
|||||||
@@ -178,7 +178,9 @@ else
|
|||||||
displaynotification "Downloading new $name" "Download in progress …"
|
displaynotification "Downloading new $name" "Download in progress …"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if ! curl -fsL ${=curlOptions} "$downloadURL" -o "$archiveName"; then
|
set -x
|
||||||
|
if ! curl -fsL ${curlOptions} "$downloadURL" -o "$archiveName"; then
|
||||||
|
set +x
|
||||||
printlog "error downloading $downloadURL"
|
printlog "error downloading $downloadURL"
|
||||||
message="$name update/installation failed. This will be logged, so IT can follow up."
|
message="$name update/installation failed. This will be logged, so IT can follow up."
|
||||||
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
||||||
@@ -192,7 +194,7 @@ else
|
|||||||
cleanupAndExit 2
|
cleanupAndExit 2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
set +x
|
||||||
# MARK: when user is logged in, and app is running, prompt user to quit app
|
# MARK: when user is logged in, and app is running, prompt user to quit app
|
||||||
if [[ $BLOCKING_PROCESS_ACTION == "ignore" ]]; then
|
if [[ $BLOCKING_PROCESS_ACTION == "ignore" ]]; then
|
||||||
printlog "ignoring blocking processes"
|
printlog "ignoring blocking processes"
|
||||||
|
|||||||
Reference in New Issue
Block a user