Skip to content

Instantly share code, notes, and snippets.

@mpilosov
Created January 27, 2018 06:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpilosov/06d48a9d17a738ac727d737ff541d949 to your computer and use it in GitHub Desktop.
Save mpilosov/06d48a9d17a738ac727d737ff541d949 to your computer and use it in GitHub Desktop.
check git log for commits, act on result.
#!/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