Download full macos installers with curl --limit-rate and can resume partial dow...
source link: https://gist.github.com/dukechem/f8f535d279b3d496444abaeb2b11e3e4
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Intended for home users to get huge installers very slowly without hogging bandwidth. Supposedly softwareupdate also throttles downloads based on machine usage, but this script always forces throttling.
This script can download on a 10.11 laptop, for example, the entire 6gig+ full mojave installer very slowly in background, via curl with a --limit-rate 377k
throttling. Edit the value to suit your needs for example "3M" should finish 6gig download in about 6 hours . At the 377k/sec as is, it might take a 1 or 2 days for entire 6gigs per https://www.download-time.com/. Re-run the command if need be to resume downloads after laptop wakes up. Should probably be run from /tmp so a reboot would delete any partial/incomplete downloads. Just remember to move downloads out of tmp before a restart, because macos clears /private/tmp upon every startup.
This is a hack of munki//installinstallmacos.py script
My python skills are horrible, or I would try to fork the munki script, and add proper command line argument "--limit-rate" to pass to
curl, and fix the url issue. I may try making feature request in issues...
The munki script on 10.11 macbook-air died saying Could not find a default catalog url for this OS version.
unless a complicated --catalogurl was passed.
This fetch-macOS.py would get 10.14 but had no rate-limit nor resume ability. so I used the "something" url from it. Only other tweaks: comment out the check if running as root, and added --limit-rate 377k
to curl command it uses.
Quickstart
Save to fetch-macos-throttled-resume.py
in your Downloads folder.
Optionally edit the --limit-rate value which is very slow in this example 377k
$ chmod a+x ~/Downloadsfetch-macos-throttled-resume.py
$ cd /tmp; ~/Downloads/fetch-macos-throttled-resume.py
...
# ProductID Version Build Post Date Title
1 061-77704 10.15.4 19E242d 2020-02-26 macOS Catalina Beta
2 001-15219 10.15.5 19F2200 2020-06-15 macOS Catalina
3 001-04366 10.15.4 19E2269 2020-05-04 macOS Catalina
4 041-91758 10.13.6 17G66 2019-10-19 macOS High Sierra
5 041-88800 10.14.4 18E2034 2019-10-23 macOS Mojave
6 061-26589 10.14.6 18G103 2019-10-14 macOS Mojave
7 061-86291 10.15.3 19D2064 2020-03-23 macOS Catalina
8 041-90855 10.13.5 17F66a 2019-10-23 Install macOS High Sierra Beta
9 061-26578 10.14.5 18F2059 2019-10-14 macOS Mojave
10 061-44345 10.15.2 19C39d 2019-11-15 macOS Catalina Beta
Choose a product to download (1-10):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK