Created
September 27, 2014 01:38
-
-
Save cheeseprocedure/8b786b2dfc84b7a49421 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# Throw an alert when a page's contents have changed | |
# | |
# Requires https://github.com/alloy/terminal-notifier | |
DELAY="30" | |
URL="https://ftp.gnu.org/gnu/bash/bash-3.2-patches/?C=M;O=D" | |
CHECKSUM="d1476050bb854ad1d33ce539cd5214fc5c9802d3" | |
while true; do | |
if [[ `curl -s "${URL}" | shasum` == "${CHECKSUM} -" ]]; then | |
echo "`date` - checksum has not changed - sleeping..." | |
else | |
terminal-notifier -message "bash updates RELEASED @ ${URL}" -title 'Bash updates!' | |
break | |
fi | |
sleep ${DELAY} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment