Skip to content

Instantly share code, notes, and snippets.

View jordanmerrick's full-sized avatar

Jordan Merrick jordanmerrick

View GitHub Profile
@jordanmerrick
jordanmerrick / firmwhere.sh
Created August 24, 2012 08:41
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 ed