Created
November 11, 2012 20:11
-
-
Save calmez/4056095 to your computer and use it in GitHub Desktop.
small script that tells you when mountain lion is available
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 | |
URL='http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewMultiRoom?fcId=489264329&mt=12' | |
SEARCH_STRING="mountain" | |
echo "Mountain Lion" | |
echo "Press Ctrl-C to exit." | |
echo "" | |
while true ; do | |
curl -silent -A "iMacAppStore/1.0.1 (Macintosh; U; Intel Mac OS X 10.6.7; en) AppleWebKit/533.20.25" ${URL} | grep -i "${SEARCH_STRING}" > /dev/null | |
if [ "$?" == "0" ]; then | |
echo "Search string found!" | |
say "Mountain Lion has been released" | |
echo "Opening search URL" | |
open $URL | |
exit | |
else | |
echo "Nothing found yet. Trying again in 5 minutes..." | |
fi | |
sleep 300 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment