Forked from rahul286/mac-osx-el-captain-commands.sh
Last active
April 24, 2016 11:00
-
-
Save lkraider/6f8d47708c56a2e2253a74d4acdfed94 to your computer and use it in GitHub Desktop.
Updating to Mac El Capitan using downloaded pkg file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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