Created
February 13, 2020 05:13
-
-
Save apsun/95962a46d0bc30b9e3f9e9e9dd094bcd to your computer and use it in GitHub Desktop.
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/sh | |
old="" | |
while :; do | |
new="$(curl -s 'https://www.apple.com/shop/retail/pickup-message?parts.0=MWP22AM%2FA&location=94043' | jq '.body.stores[:4][].partsAvailability["MWP22AM/A"] | select (.pickupDisplay == "available") | .storePickupQuote' -r | head -n1)" | |
if [ "$new" != "$old" ]; then | |
if [ "$new" != "" ]; then | |
notify-send 'AirPods' "$new" | |
fi | |
old="$new" | |
fi | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment