Skip to content

Instantly share code, notes, and snippets.

@codesoda
Created September 9, 2016 07:14
Show Gist options
  • Save codesoda/fa5dc8768e4019bee0b32e71b4d3f19d to your computer and use it in GitHub Desktop.
Save codesoda/fa5dc8768e4019bee0b32e71b4d3f19d to your computer and use it in GitHub Desktop.
Check apple store to see if iphone is available yet
main() {
while [[ true ]]; do
local request="$(curl -s 'http://www.apple.com/us/shop/goto/iphone_7/select' | grep 'be back soon')"
if [[ ! $request ]]; then
say 'Yep, time to buy'
break
fi
echo "Not luck yet :("
sleep 5
done
}
main "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment