Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Author: Paul Alesius
- LOG=/tmp/git.log
- read oldrev newrev refname
- IMAGE=/home/git/terminator.gif
- LINESOFCODE=$(git ls-tree --full-tree -r HEAD | while read line; do git cat-file -p $(echo $line | awk '{print $3}'); done | wc -l)
- PROJECTS=$(git ls-tree --full-tree -r HEAD | grep "/pom.xml$" | wc -l)
- STATUSLINE=$(git diff --shortstat $oldrev $newrev)
- LINES[0]="you-cannot-win"
- LINES[1]="you-must-sacrifice-the-lamb"
- LINES[2]="disarm-retreat-and-regroup"
- LINES[3]="unsatiable-appetite"
- LINES[4]="satan-compels-you"
- LINES[5]="im-poor-im-allowed-to-rob-and-steal"
- LINES[6]="i-code-bedbugs"
- LINES[7]="summa-summarum"
- LINES[8]="kill-bill"
- LINES[9]="we-have-what-is-called-a-supercritical-mass-and-our-situation-is-also-supercritical"
- LINES[10]="fascination-with-china"
- LINES[11]="your-ignorance-is-a-self-fulfilling-prophecy"
- LINES[12]="the-longer-the-walk-the-further-you-come"
- EDITION=${LINES[$RANDOM % ${#LINES[@]}]}
- TWEET="robopost 🤖: $PROJECTS projects, $LINESOFCODE lines of code #skynät the $EDITION-edition"
- # Image
- #MEDIA=$(/usr/local/bin/twurl -H upload.twitter.com "/1.1/media/upload.json" -f /home/git/terminator.gif -F media -X POST | /usr/bin/jq -r '.media_id_string')
- #/usr/local/bin/twurl -d "media_ids=$MEDIA&status=$TWEET" /1.1/statuses/update.json
- /usr/local/bin/twurl -d "status=$TWEET" /1.1/statuses/update.json
Advertisement
Add Comment
Please, Sign In to add comment