Last active
June 23, 2017 08:00
-
-
Save eduherraiz/c19f35ff5783b2eb3e6843363fe7c772 to your computer and use it in GitHub Desktop.
Git hook to show a random fortune message using random cowsay on fridays
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 | |
# System Dependencies | |
# sudo apt install fortune cowsay toilet | |
if [[ $(date +%u) -eq 5 ]] ; then | |
MESSAGE='FRIDAY AT APSL' | |
COW_STATUS=`shuf -n1 -e b d g p s t w y` | |
COWFILES=`cowsay -l | grep -v files` | |
COWFILE=`shuf -n1 -e $COWFILES` | |
echo "-- $MESSAGE --" | toilet --gay -f future | |
fortune -s -n 80 fortunes | cowsay -$COW_STATUS -f $COWFILE | toilet --gay -f term | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment