dotfiles/private_dot_config/git-hooks/pre-commit.d/executable_03_talisman.sh
2023-01-18 13:42:14 +01:00

18 lines
571 B
Bash

#!/bin/bash
#
# Calling Talisman
# The original hook script is "$HOME/.talisman/bin/talisman_hook_script"
# This is a modified versoin of the pre-push hook, calling talisman executable direct
command -v talisman > /dev/null
result=$?
if [ $result -eq 0 ]; then
[[ -n "${TALISMAN_DEBUG}" ]] && DEBUG_OPTS="-d"
CMD="talisman ${DEBUG_OPTS} -i --githook pre-commit"
[[ -n "${TALISMAN_DEBUG}" ]] && echo "ARGS are $*"
[[ -n "${TALISMAN_DEBUG}" ]] && echo "Executing: ${CMD}"
${CMD}
else
echo -e "\e[33mSkipping talisman test, executable not found"
fi