Created
January 27, 2018 06:43
-
-
Save mpilosov/06d48a9d17a738ac727d737ff541d949 to your computer and use it in GitHub Desktop.
check git log for commits, act on result.
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 | |
CHECKGITLOG=$(git log | head -3 | tail -1 | awk '{print $4;}') | |
TODAY=$(/bin/date | awk '{print $3}') | |
if [ $CHECKGITLOG -ne $TODAY ] # if you didn't do it today, act accordingly: | |
then | |
echo "HEY! YOU! DO YOUR WRITING!!! (repo synced more than a day ago)" | |
# Do whatever else. I like send_message.py (from my messager repo): | |
python messager/send_message.py 917xxxxxxx att "HEY BUM. GET WRITING. NOW." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment