Created
March 9, 2014 04:30
-
-
Save potato2003/9442941 to your computer and use it in GitHub Desktop.
Google Playにアプリが公開されたら通知してくれるスクリプト。 requirements: Mac OS X 10.8+, terminal-notifier
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/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