summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-10-10 10:40:03 +0200
committerErich Eckner <git@eckner.net>2019-10-10 10:40:03 +0200
commit801594b4d4dc882962b0fdca5146a61ce1aa7924 (patch)
tree3792472bf6a2553aa71d8dbc4850b58da1263fd9
parent26f6850821cf91273f8279f90700a9cf5ccab11c (diff)
downloadsendmailadvanced-801594b4d4dc882962b0fdca5146a61ce1aa7924.tar.xz
sendmailadvanced.in: fix --hook=ALL
-rwxr-xr-xsendmailadvanced.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/sendmailadvanced.in b/sendmailadvanced.in
index b3433b4..cbf90e2 100755
--- a/sendmailadvanced.in
+++ b/sendmailadvanced.in
@@ -108,14 +108,14 @@ while true; do
case "$1" in
-h|--hook)
shift
- if [ "x$1" = 'xALL' ]; then
+ if printf '%s\n' "$1" | grep -qixF 'ALL'; then
for hook in $(find '#ETCDIR#/sendmailadvanced.hooks' -type f); do
- if [ -x "#ETCDIR#/sendmailadvanced.hooks/${hook}" ]; then
+ if [ -x "${hook}" ]; then
hooks[${#hooks[@]}]="${hook}"
fi
done
else
- hooks[${#hooks[@]}]="$1"
+ hooks[${#hooks[@]}]="#ETCDIR#/sendmailadvanced.hooks/$1"
fi
;;
--help)