Skip to content

Instantly share code, notes, and snippets.

@hugodias
Created July 25, 2012 12:54
Show Gist options
  • Save hugodias/3176036 to your computer and use it in GitHub Desktop.
Save hugodias/3176036 to your computer and use it in GitHub Desktop.
Mountain lion search in App Store
#!/bin/sh
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 "Search string found!"
echo "Opening search URL"
open $URL
exit
else
echo "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