Created
July 25, 2012 12:54
-
-
Save hugodias/3176036 to your computer and use it in GitHub Desktop.
Mountain lion search in App Store
This file contains 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 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