From: Colin Watson Date: Fri, 25 Oct 2002 12:33:11 +0000 (+0000) Subject: deblist-action: New script to subscribe to or unsubscribe from Debian X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?p=bin.git;a=commitdiff_plain;h=37e3759b855f6e816663aa1e7673052532d15393;ds=sidebyside deblist-action: New script to subscribe to or unsubscribe from Debian mailing lists. --- diff --git a/deblist-action b/deblist-action new file mode 100755 index 0000000..a07ca36 --- /dev/null +++ b/deblist-action @@ -0,0 +1,28 @@ +#! /bin/sh +set -e + +if ([ "$1" != subscribe ] && [ "$1" != unsubscribe ]) || \ + [ -z "$2" ] || [ -z "$3" ]; then + echo "Usage: $0 subscribe|unsubscribe list address" 2>&1 + exit 1 +fi + +ACTION="$1" +LIST="${2%%@*}" +ADDRESS="$3" + +DRAFT=`tempfile` +trap 'rm -f "$DRAFT"' EXIT ERR HUP INT QUIT TERM + +cat >"$DRAFT" < +To: $LIST-request@lists.debian.org +Subject: $ACTION $ADDRESS +Fcc: =debian/lists + +$ACTION $ADDRESS +EOF + +mutt -H "$DRAFT" + +exit 0