Guest User

Untitled

a guest
Feb 24th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #! /usr/bin/env bash
  2.  
  3. set -e
  4.  
  5. shopt -s extglob
  6.  
  7. HOOKDIR="$(git rev-parse --git-dir)/hooks"
  8.  
  9. if [ -d "$HOOKDIR" ]; then
  10. rm -rf "${HOOKDIR:?}"/!(*.sample)
  11. echo "all hooks removed from $HOOKDIR"
  12. else
  13. echo "no git hooks folder found, you probably aren't in a git repo"
  14. exit 1
  15. fi
Add Comment
Please, Sign In to add comment