Skip to content

Instantly share code, notes, and snippets.

@potato2003
Created March 9, 2014 04:30
Show Gist options
  • Save potato2003/9442941 to your computer and use it in GitHub Desktop.
Save potato2003/9442941 to your computer and use it in GitHub Desktop.
Google Playにアプリが公開されたら通知してくれるスクリプト。 requirements: Mac OS X 10.8+, terminal-notifier
#!/bin/bash
if [[ -z "${PACKAGE}" ]]; then
echo "error: PACKAGE is not assagined."
echo " usage) export PACKAGE=com.example; $(basename ${0})"
exit 1
fi
while :
do
status=$(curl "https://play.google.com/store/apps/details?id=${PACKAGE}" --include 2>/dev/null | head -n 1 | awk '{ print $2 }')
echo -n "status: ${status} "; date
if [[ "404" != ${status} ]]; then
echo "status: ${status}" | terminal-notifier -sound default
open "https://play.google.com/store/apps/details?id=${PACKAGE}"
exit
fi
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment