From 395dbfc726278dfe154ad3b5ccb0e2ebfd30c0d7 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 12 Feb 2014 09:26:48 -0800 Subject: [PATCH] update learn from ham --- learn_from_spam | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/learn_from_spam b/learn_from_spam index 453841f..b843d05 100755 --- a/learn_from_spam +++ b/learn_from_spam @@ -1,13 +1,15 @@ #!/bin/bash -if [ "$0" = "learn_from_spam" ]; then +if [ "$(basename $0)" = "learn_from_spam" ]; then for file in "$@"; do spamassassin -r < "$file"; spamassassin -R < "$file"; done; -elif [ "$0" = "learn_from_ham" ]; then +elif [ "$(basename $0)" = "learn_from_ham" ]; then for file in "$@"; do spamassassin -k < "$file"; spamassassin -W < "$file"; done; +else + "Called in a way this script cannot recognize"; fi; -- 2.39.5