From: Don Armstrong Date: Wed, 12 Feb 2014 17:26:48 +0000 (-0800) Subject: update learn from ham X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=commitdiff_plain;h=395dbfc726278dfe154ad3b5ccb0e2ebfd30c0d7 update learn from ham --- 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;