Skip to content

Instantly share code, notes, and snippets.

@stefanschmidt
Forked from AriX/mountainlion.sh
Last active October 7, 2015 13:58
Show Gist options
  • Save stefanschmidt/3175922 to your computer and use it in GitHub Desktop.
Save stefanschmidt/3175922 to your computer and use it in GitHub Desktop.
Script to check for Mac OS X 10.8 Mountain Lion
#!/bin/bash
USER_AGENT="iMacAppStore/1.0.1 (Macintosh; U; Intel Mac OS X 10.6.7; en) AppleWebKit/533.20.25"
STORE_URL="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewMultiRoom?fcId=489264329&mt=12&s=143461"
SEARCH_STRING="mountain lion"
clear; echo -n "Waiting for Mountain Lion"
while true; do
if curl -sA "$USER_AGENT" "$STORE_URL" | grep -i "$SEARCH_STRING" > /dev/null; then
echo; echo "Check the App Store!"
say "Mountain Lion may be available"
break
else
echo -n "."
fi
sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment