#!/bin/bash # Check if the directory is the root directory if [ ! -d ".git/" ]; then echo "Please commit from within the root directory" exit 1 fi # Run every file inside the post-commit.d directory for file in .git/hooks/post-commit.d/* do . $file done