about summary refs log tree commit diff
path: root/contrib
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-01-10 16:53:36 +0100
committerLeah Neukirchen <leah@vuxu.org>2019-01-10 16:53:36 +0100
commit75980790a6c28e794237d7ba89771f8a67170bea (patch)
tree815804bfcd35d6e223521cd145e62e6522a85ac7 /contrib
parentc5cd4df026e8f8b7a8334028dda21af13e205ce3 (diff)
downloadmblaze-75980790a6c28e794237d7ba89771f8a67170bea.tar.gz
mblaze-75980790a6c28e794237d7ba89771f8a67170bea.tar.xz
mblaze-75980790a6c28e794237d7ba89771f8a67170bea.zip
contrib/msign: use default key for From:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/msign5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/msign b/contrib/msign
index bfec07b..7f23ab4 100755
--- a/contrib/msign
+++ b/contrib/msign
@@ -9,8 +9,11 @@ IFS='
 TMPD=$(mktemp -d -t msign.XXXXXX)
 trap "rm -rf '$TMPD'" INT TERM EXIT
 
+FROM=$(maddr -a -h from "$1" | sed 1q)
+[ "$FROM" ] && key="--default-key=$FROM"
+
 awk '/^$/,0' "$1" | mmime | sed 's/$/
/' >"$TMPD"/content
-gpg2 --armor --detach-sign -o "$TMPD"/signature.asc "$TMPD"/content ||
+gpg2 $key --armor --detach-sign -o "$TMPD"/signature.asc "$TMPD"/content ||
 	exit $?
 
 {