Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lkraider/6f8d47708c56a2e2253a74d4acdfed94 to your computer and use it in GitHub Desktop.
Save lkraider/6f8d47708c56a2e2253a74d4acdfed94 to your computer and use it in GitHub Desktop.
Updating to Mac El Capitan using downloaded pkg file
#!/bin/sh
set -ex
## El Capitan Download
## based on https://github.com/lioonline/OS-X-El-Capitan
## and https://7labs.heypub.com/tips-tricks/el-capitan-direct-download.html
## pkg file link - version 10.11.4
HOST="http://osxapps.itunes.apple.com"
PATH="/apple-assets-us-std-000001/Purple69/v4/6a/c9/bc/6ac9bcc0-71a4-9b73-bb59-c1b053df10b9/"
FILE="urb7005441541655397271.pkg"
# create a tmp folder
mkdir elCapitanRoot
cd elCapitanRoot
# download package file
curl -#O "${HOST}${PATH}${FILE}"
# create a folder structure to match apple server
mkdir -p ".${PATH}"
# move downloaded pkg file to proper path
mv "${FILE}" ".${PATH}"
# start a web server when you are in "elCapitanRoot" folder
sudo python -m SimpleHTTPServer 80
# edit your mac's /etc/hosts file to add following line
echo "127.0.0.1 osxapps.itunes.apple.com" | sudo tee -a /etc/hosts
# open "App Store" app on Mac and run update.
# it should download pkg file from local/LAN server
### Important - remove /etc/hosts entry when done, for "App Store" to work
@bezik46
Copy link

bezik46 commented Apr 24, 2016

pgk itself is no longer enough! pfpkg is also needed!
http://iariswidodo.blogspot.co.uk/2016/04/how-direct-download-and-update-osx-el.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment