diff --git a/Makefile b/Makefile index 04b94e2de..1213d76cc 100644 --- a/Makefile +++ b/Makefile @@ -151,11 +151,19 @@ phpcbf: ## Add symbolic link from custom script(s) to /.git/hooks/pre-commit hooksymlink: +ifneq ("$(wildcard scripts/git_hooks/pre-commit.sh)","") @echo "Installing git hooks" $(shell ln -sf ../../scripts/git_hooks/pre-commit.sh .git/hooks/pre-commit) +else + @echo "scripts/git_hooks/pre-commit.sh file does not exist" +endif + ## Execute git hooks hookexec: +ifneq ("$(wildcard scripts/git_hooks/pre-commit.sh)","") @echo "Executing git hooks" - /bin/sh ./scripts/git_hooks/pre-commit.sh - + @/bin/sh ./scripts/git_hooks/pre-commit.sh +else + @echo "scripts/git_hooks/pre-commit.sh file does not exist" +endif \ No newline at end of file