cryptofascist

Untitled

Oct 28th, 2018
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.36 KB | None | 0 0
  1. #!/bin/bash
  2. # Author: Paul Alesius
  3.  
  4. LOG=/tmp/git.log
  5.  
  6. read oldrev newrev refname
  7.  
  8. IMAGE=/home/git/terminator.gif
  9.  
  10. LINESOFCODE=$(git ls-tree --full-tree -r HEAD | while read line; do git cat-file -p $(echo $line | awk '{print $3}'); done | wc -l)
  11. PROJECTS=$(git ls-tree --full-tree -r HEAD | grep "/pom.xml$" | wc -l)
  12.  
  13. STATUSLINE=$(git diff --shortstat $oldrev $newrev)
  14. LINES[0]="you-cannot-win"
  15. LINES[1]="you-must-sacrifice-the-lamb"
  16. LINES[2]="disarm-retreat-and-regroup"
  17. LINES[3]="unsatiable-appetite"
  18. LINES[4]="satan-compels-you"
  19. LINES[5]="im-poor-im-allowed-to-rob-and-steal"
  20. LINES[6]="i-code-bedbugs"
  21. LINES[7]="summa-summarum"
  22. LINES[8]="kill-bill"
  23. LINES[9]="we-have-what-is-called-a-supercritical-mass-and-our-situation-is-also-supercritical"
  24. LINES[10]="fascination-with-china"
  25. LINES[11]="your-ignorance-is-a-self-fulfilling-prophecy"
  26. LINES[12]="the-longer-the-walk-the-further-you-come"
  27.  
  28.  
  29. EDITION=${LINES[$RANDOM % ${#LINES[@]}]}
  30. TWEET="robopost 🤖: $PROJECTS projects, $LINESOFCODE lines of code #skynät the $EDITION-edition"
  31.  
  32.  
  33. # Image
  34. #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')
  35. #/usr/local/bin/twurl -d "media_ids=$MEDIA&status=$TWEET" /1.1/statuses/update.json
  36.  
  37. /usr/local/bin/twurl -d "status=$TWEET" /1.1/statuses/update.json
Advertisement
Add Comment
Please, Sign In to add comment