Skip to content

Instantly share code, notes, and snippets.

@tchn
Created June 12, 2012 14:15
Show Gist options
  • Save tchn/2917812 to your computer and use it in GitHub Desktop.
Save tchn/2917812 to your computer and use it in GitHub Desktop.
shell script to tell if an android application is publicly available on googleplay
#!/bin/sh -e
set -o nounset
PLAY_URL="https://play.google.com/store/apps/details?id="
ret="private_app_list.txt"
if ! [ $# -eq 1 ]; then
echo "Error: appname not provided!";
exit
fi
appname="$1"
#echo "Checking ${appname} ..."
curl "${PLAY_URL}${appname}" -I | if egrep -i '404 not found'; then
echo "${appname} is not in play store!";
echo "${appname}" >> "$ret";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment