Skip to content

Instantly share code, notes, and snippets.

@jordanmerrick
Created August 24, 2012 08:41
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordanmerrick/3447610 to your computer and use it in GitHub Desktop.
Save jordanmerrick/3447610 to your computer and use it in GitHub Desktop.
Firmwhere: A Shell Script to List and Download All Current and Previous iOS and iPod Software Updates From Apple
#!/bin/sh
## The first part filters the XML file on Apple's Update Server that iTunes checks with when looking for iOS and iPod software updates, filtering and displaying only the URLs and saving them to a text file in /var/tmp/firmwhere.txt
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | grep -v protected | grep -v Recovery | sort -u | sed 's/<string>//g' | awk '{$1=$1}1' | sed 's/<\/string>//g' > /var/tmp/firmwhere.txt
## If necessary, you can download *all* available software updates by uncommenting the command below. Make sure to change directory to the one you want to download to first or edit the command appropriately. It will just loop through the text file and using cURL, will download all iOS and iPod software updates.
##If you have wget installed, uncomment the second line instead to use wget and it will skip any updates downloaded. Again, change directory to the one you want to download to or edit the command.
## Using cURL
## for i in `cat /var/tmp/firmwhere.txt`; do curl -O $i; done
## Using wget
## wget -m -nd -i /var/tmp/firmwhere.txt
@Elefontman
Copy link

Question: can we add the ability to dl beta IOS's?

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