#!/bin/bash # Create git hooks folder mkdir -p .git/hooks # Install git hooks if [[ (-a .git/hooks/commit-msg) || (-a .git/hooks/pre-commit) || (-a .git/hooks/pre-push) ]]; then echo "Git hooks already installed" else echo "Installing git hooks" ln -s ../../hooks/commit-msg .git/hooks/commit-msg ln -s ../../hooks/pre-commit .git/hooks/pre-commit ln -s ../../hooks/pre-push .git/hooks/pre-push fi