-
-
Notifications
You must be signed in to change notification settings - Fork 136
Legacy 2. Downloading (caching) the latest macOS installer app
When erase-install.sh
is run without any options, it will download the latest available production macOS installer. The installer is stored in a sparsebundle
image in the working directory.
If an installer is already cached on the system, either in the working directory or in /Applications
, the script will detect this and do nothing more.
Installer applications in other locations will not be detected.
If the --move
parameter is used, the installer application is subsequently extracted from the sparseimage and placed in the /Applications
folder.
If the --move
parameter is used and an installer is cached in the sparseimage in the working directory, it will be extracted and moved to /Applications
.
If the --overwrite
parameter is used, any cached installer, whether in the working directory or in /Applications
, is deleted and the latest installer is downloaded from Apple's catalogs.
If the --update
parameter is used, and an installer application is already cached on the system, the script will compare the version of the cached system with the installer that is available from Apple's catalogs. If a newer version is available, the cached installer is removed and the latest version is downloaded. Nothing is downloaded if the versions are the same or the cached system is newer (for example there is a cached beta installer).
The --replace_invalid
parameter works similarly to the --update
parameter, but any cached installer is only replaced if the script detects that it is incompatible with the local hardware (usually because the version of the cached installer is older than the current system).
The --clear-cache-only
parameter can be used in conjunction with --update
or --overwrite
to facilitate removal of cached installers, so that you do not need to create any sort of clean up script yourself. This option will remove any installers from the local system when used with --overwrite
, or any outdated installers when used with --update
, and then will exit.
By default, Apple's production catalog is used to obtain macOS installer applications. However, you can access installers from one of Apple's seed programs. The available seed programs are PublicSeed, CustomerSeed and DeveloperSeed. These correspond to the Public Beta, AppleSeed and Developer catalogs.
If the --beta
parameter is used, the script will download the latest available installer, including any betas that are available. Normally, beta installers are only available if you select a seed program using the --seedprogram
parameter.
For systems running macOS 10.15 Catalina or greater, experimental support is added for softwareupdate --fetch-full-installer
. This new functionality can be used to replace the use of installinstallmacos.py
.
When using the --fetch-full-installer
option. It will set the seed catalog supplied with the --seedprogram argument, using macOS's built in seedutil
command. The --fetch-full-installer option can be used in conjunction with the --overwrite, --update, --replace_invalid, --reinstall, and --erase options.
Note that this option will not facilitate the use of Caching Server to locally cache the installers. This is a limitation of Apple, not this script.