Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
#!/bin/bash FIRMWARE=0 while [ ${FIRMWARE} != "2" -a ${FIRMWARE} != "1" -a ${FIRMWARE} != "3" ]; do echo "What firmware is your iPhone running?" echo "1) 1.0" echo "2) 1.0.1" echo "3) 1.0.2" echo -n "Enter 1, 2 or 3: " read FIRMWARE if [ ${FIRMWARE} == "1" ]; then echo "Using firmware 1.0" FIRMWARE_ZIP="iPhone1,1_1.0_1A543a_Restore.ipsw.zip" FIRMWARE_URL="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3538.20070629.B7vXa/iPhone1,1_1.0_1A543a_Restore.ipsw" FIRMWARE_FILES="694-5259-38.dmg kernelcache.restore.release.s5l8900xrb" elif [ ${FIRMWARE} == "2" ]; then echo "Using firmware 1.0.1" FIRMWARE_ZIP="iPhone1,1_1.0.1_1C25_Restore.ipsw.zip" FIRMWARE_URL="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3614.20070731.Nt6Y7/iPhone1,1_1.0.1_1C25_Restore.ipsw" FIRMWARE_FILES="009-7662-6.dmg kernelcache.release.s5l8900xrb" elif [ ${FIRMWARE} == "3" ]; then echo "Using firmware 1.0.2" FIRMWARE_ZIP="iPhone1,1_1.0.2_1C28_Restore.ipsw.zip" FIRMWARE_URL="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-3823.20070821.vormd/iPhone1,1_1.0.2_1C28_Restore.ipsw" FIRMWARE_FILES="009-7698-4.dmg kernelcache.release.s5l8900xrb" else echo echo "Invalid firmware entered, please enter 1, 2 or 3. Try again.". echo fi done echo echo "Fetching restore zip file from Apple..." echo curl -C - -o ${FIRMWARE_ZIP} ${FIRMWARE_URL} unzip -o ${FIRMWARE_ZIP} ${FIRMWARE_FILES} ./bootstrapper ${FIRMWARE_FILES}
This paste will be private.
From the Design Piracy series on my blog: