#!/bin/bash
if [[ `curl -s "https://play.google.com/store/devices/details?id=nexus_4_16gb" | grep -i "coming soon"` ]]
then
echo "Waiting";
elif [[ `curl -s "https://play.google.com/store/devices/details?id=nexus_4_16gb" | grep -i "sold out"` ]]
then
echo "Waiting";
else
echo "Check the site: https://play.google.com/store/devices/details?id=nexus_4_16gb" | mail -s "Nexus" "##YOUR_EMAIL_ADDRESS_HERE##";
fi