13 lines
266 B
Bash
Executable file
13 lines
266 B
Bash
Executable file
#!/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 pre-commit.d directory
|
|
for file in .git/hooks/pre-commit.d/*
|
|
do
|
|
. $file
|
|
done
|