Last year, we showed you how to check for the 3.0 firmware release via the terminal command line. As we move into the new year, TUAW reader Mike K writes in, saying "Being compulsive, is the terminal command to check for 3.0 the same as for 4.0? I'd love to know..."
Hey Mike, yes the terminal command is more or less the same as last year, but we have a slight improvement for you, so your system will speak to you when the new firmware goes live.
curl -s -L http://phobos.apple.com/version | grep -i Restore | grep -i iPhone | grep -i 4.0
if ($? == 1) then
echo "Nothing yet..."
say "FOUR POINT OH FIRMWARE IS NOW AVAILABLE"
Save this script into a new file (e.g. "checkingscript") and chmod it to 755 so it will be executable. (The line that starts with "curl" and ends with "4.0" is a single line -- so make sure you don't split it in two. Also make sure you put a carriage return at the end of the "sleep 30" line.) Then run the script from the command line using a repeat command, e.g. repeat 5000 ./checkingscript. The built-in "sleep" command ensures that it will wait 30 seconds between attempts. If you are not using csh or tcsh, just type csh at the command line before issuing the repeat command.
The script works by checking for iPhone restore firmware that has 4.0 in the name. When it finds this, the curl command will return a success (exit status 0 versus a failed exit status of 1) and your system will speak to you using the OS X "say" command.
You will need to select your firmware using the iPhone or iPod touch model. They are:
- iPhone 3G: iPhone 1,2
- iPhone 3GS: iPhone 2,1
- iPod touch 2G: iPod 2,1
- iPod touch 3G: iPod 3,1
To download, copy the full phobos.apple.com URL and paste it into Safari's download window or use any other favorite method to retrieve the firmware. Then hold the Option key and click Update in iTunes. Navigate to the firmware (the ipsw file), select it, and 4.0's good to go. Of course, you can also download directly through iTunes as soon as the update is available.