Guest User

Untitled

a guest
Nov 21st, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #!/bin/bash
  2. #import os
  3.  
  4. echo "Running pre-commit hook"
  5. checks=os.environ["APPSETTING_DEVPASSWORD"],os.environ["APPSETTING_DEVUSER"],os.environ["APPSETTING_DEVPASS_ELMAH"]
  6.  
  7.  
  8.  
  9. git diff --cached --name-status | while read x file; do
  10.  
  11. if [ "$x" == 'D' ]; then continue; fi
  12. for word in $checks
  13. do
  14. if egrep $word $file ; then
  15. echo "ERROR: Disallowed expression "${word}" in file: ${file}"
  16. exit 1
  17. fi
  18. done
  19. done || exit $?
Add Comment
Please, Sign In to add comment