evoacme: don't execute hooks with dots in file name

This commit is contained in:
Jérémy Lecour 2017-10-20 10:15:12 +02:00 committed by Jérémy Lecour
parent 0ed1ca1356
commit 8567160596

View file

@ -258,8 +258,10 @@ main() {
export EVOACME_CHAIN="${LIVE_CHAIN}"
export EVOACME_FULLCHAIN="${LIVE_FULLCHAIN}"
for hook in $(find ${HOOKS_DIR} -type f | grep -v ".disabled$"); do
if [ -x "${hook}" ]; then
# search for files in hooks directory
for hook in $(find ${HOOKS_DIR} -type f); do
# keep only executables files, not containing a "."
if [ -x "${hook}" ] && $(basename "${hook}" | grep -vq .); then
debug "Executing ${hook}"
${hook}
fi