Add options to enable/disable hooks (sending mail, commit /etc/.git, save to database…) #7

Merged
jlecour merged 61 commits from options into master 2019-03-26 15:14:12 +01:00
Showing only changes of commit 7833c9c3ee - Show all commits

View file

@ -230,8 +230,7 @@ hook_mail() {
}
hook_log() {
echo "----------- $(get_now) ---------------" >> "${LOGFILE}"
echo "${BLOB}" >> "${LOGFILE}"
printf "----------- %s ---------------\n%s\n" "$(get_now)" "${BLOB}" >> "${LOGFILE}"
}
# load configuration if present.
@ -400,10 +399,8 @@ fi
# Commit hook
if [ "${INTERACTIVE}" = "1" ]; then
if test -n "${GIT_STATUSES}" && [ "${HOOK_COMMIT}" = "1" ]; then
echo "/!\ There are some uncommited changes."
echo "${GIT_STATUSES}"
echo ""
if [ -n "${GIT_STATUSES}" ] && [ "${HOOK_COMMIT}" = "1" ]; then
printf "/!\ There are some uncommited changes.\n%s\n\n" "${GIT_STATUSES}"
y="Y"; n="n"
answer=""