thorpedosg

Untitled

Jul 24th, 2018
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # This file is managed by Puppet
  3.  
  4. export TMPDIR="/tmp/svntmp"
  5.  
  6. if [ ! -e "TMPDIR" ]; then
  7. mkdir -p $TMPDIR
  8. fi
  9.  
  10. export PATH="/usr/bin:/bin:/usr/local/bin"
  11. export REPOS="$1"
  12. export TMPFILE=$(mktemp -p $TMPDIR)
  13. export REV="$2"
  14.  
  15. AUTHOR="$(grep `svnlook author -r "$REV" "$REPOS"` /etc/passwd | cut -d: -f5)"
  16. MAILADDR="mygroup@mycompany.com"
  17.  
  18. svnnotify -r "$REV" \
  19. -C \
  20. -d \
  21. -H Alternative --alt HTML::ColorDiff \
  22. -p "$REPOS" \
  23. -P "Puppet SVN Commit " \
  24. -t "$MAILADDR" \
  25. --from "$AUTHOR <$(echo $AUTHOR | tr ' ' '_')@mycompany.com>" \
  26. --reply-to $MAILADDR
  27.  
  28. exit $?
Add Comment
Please, Sign In to add comment