mirror of https://github.com/leahneukirchen/mblaze
add mgpg
parent
df7cd7249c
commit
687b3ddc0d
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
tmp=$(mktemp)
|
||||||
|
trap "rm -f '$tmp'" INT TERM EXIT
|
||||||
|
|
||||||
|
{
|
||||||
|
echo "Content-Type: $PIPE_CONTENTTYPE"
|
||||||
|
echo
|
||||||
|
cat
|
||||||
|
} > "$tmp"
|
||||||
|
|
||||||
|
n=$(mshow -t "$tmp" | awk -F: '
|
||||||
|
/: application\/pgp-encrypted/ {supported = 1}
|
||||||
|
/: application\/octet-stream/ {if (supported) print $1}')
|
||||||
|
|
||||||
|
if [ "$n" ]; then
|
||||||
|
mshow -O "$tmp" "$n" | gpg -d 2>&1
|
||||||
|
exit 64
|
||||||
|
fi
|
||||||
|
exit 63
|
Loading…
Reference in New Issue