Created
October 20, 2020 15:35
-
-
Save christianroman/21415ae6f9dd07cae0b7327df8fc669d to your computer and use it in GitHub Desktop.
Apple Pay Mexico
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 | |
# Country code | |
CC="MX" | |
URL="https://smp-device-content.apple.com/static/region/v2/config.json" | |
HOME_PAGE="https://www.apple.com/mx/apple-pay" | |
FOUND=false | |
function check { | |
RET=$(curl -s $URL | jq .SupportedRegions.$CC) | |
([ $?==0 ] && echo $RET) || echo "null" | |
} | |
while [ $FOUND = false ]; do | |
R=$(check) | |
if [ "$R" != "null" ]; then | |
FOUND=true | |
echo -e "\a" | |
open $HOME_PAGE | |
open $URL | |
fi | |
sleep 5; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment