#!/bin/bash # # Githooks templater module. # # Parameters SHARE="$1" # Include basic functions source $SHARE/templater/functions || exit 1 # Git hooks implementation function templater_githooks { # TODO: check if githooks are already set if [ -d ".git" ]; then if which git-hooks &> /dev/null; then templater_echo "Setting up git-hooks..." git hooks --install fi else templater_echo "Git hooks already set" fi } # Dispatch templater_githooks