]> git.madduck.net Git - etc/mailfilter.git/blobdiff - bin/kill-from

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

also look for replied messages
[etc/mailfilter.git] / bin / kill-from
index 8d5d2ae38dbf9142acf0f64c261b251a449dd7be..396d23ba1bf7c0acb8c665b8c70acd93a751b78a 100755 (executable)
@@ -1,7 +1,8 @@
 #!/bin/sh
 set -eu
 
-IGNORE_FILE="${0%/*}/../config/ignore"
+CONFIG_DIR="${0%/*}/../config"
+IGNORE_FILE="$CONFIG_DIR/ignore"
 ME="${0##*/}"
 
 case "$ME" in
@@ -35,7 +36,7 @@ case "$ME" in
         exit 2
         ;;
     esac
-    CHECKPREFIX='References: <something> '
+    CHECKPREFIX='References: <something> <'
     CHECKPOSTFIX='>'
     REPREFIX='^References:.*\<'
     REPOSTFIX='\>'
@@ -50,6 +51,9 @@ fi
 
 ARG_ESCAPED="$(echo "$ARG" | sed -re 's,([.+]),\\\1,g')"
 cat <<_eof >> $IGNORE_FILE
-$^# $(date +%Y.%m.%d.%H.%m.%S) added by ${0##*/}
+$^# added by $ME @$(date +%s)
 $REPREFIX$ARG_ESCAPED$REPOSTFIX
 _eof
+
+cd $CONFIG_DIR
+git-commit -m"$ME $1" ${IGNORE_FILE##*/}