Skip to content

Instantly share code, notes, and snippets.

@cliss
Created July 25, 2012 11:26
Show Gist options
  • Save cliss/3175632 to your computer and use it in GitHub Desktop.
Save cliss/3175632 to your computer and use it in GitHub Desktop.
Mountain Lion Availability Checker
#!/bin/sh
#
# Modified source from here: http://pastie.org/4328940
# As linked to from here: http://www.tuaw.com/2012/07/24/maniacally-cuckoo-for-mountain-lion-app-store-checker-shell-scr/
#
# REQUIRES growl notify, available here: http://growl.info/downloads
#
##########################################
URL='http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewMultiRoom?fcId=489264329&mt=12'
SEARCH_STRING="mountain"
echo "Mountain Lion Hunter v1.0"
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 $(date +%H:%M:%S) "- Search string found!"
growlnotify -t Mountain Lion is out! -m ROAR! -s
exit
else
date
echo $(date +%H:%M:%S) "- Nothing found yet. Trying again in 10 minutes..."
fi
sleep 600
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment