Guest User

Untitled

a guest
Jun 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Put this in your .git/hooks/post-checkout and smoke it.
  4.  
  5. function current_branch_name {
  6. git symbolic-ref HEAD | cut -d '/' -f 3
  7. }
  8.  
  9. if [ $(current_branch_name) == 'master' ]; then
  10. lines[0]="Master, Master, where's the dreams that I've been after?"
  11. lines[1]="Master, Master, you promised only lies"
  12. lines[2]="Laughter, laughter, all I hear or see is laughter"
  13. lines[3]="Laughter, laughter, laughing at my cries"
  14. echo " ${lines[$((RANDOM%${#lines[*]}))]}";
  15. fi
Add Comment
Please, Sign In to add comment