about summary refs log tree commit diff
path: root/contrib
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-01-10 23:50:54 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-01-10 23:50:54 +0100
commit7999b44de8cbec405d2e2b2965eb031e1761db5c (patch)
tree73be2363905825971d62a06f9aa117bffebe6b45 /contrib
parentbafe62e8986e4f416a60b4ea759b235e710b250c (diff)
downloadmblaze-7999b44de8cbec405d2e2b2965eb031e1761db5c.tar.gz
mblaze-7999b44de8cbec405d2e2b2965eb031e1761db5c.tar.xz
mblaze-7999b44de8cbec405d2e2b2965eb031e1761db5c.zip
mverify: properly quote the sed mess
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/mverify4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/mverify b/contrib/mverify
index 4ba0213..d5b21e7 100755
--- a/contrib/mverify
+++ b/contrib/mverify
@@ -5,7 +5,7 @@
 
 [ "$#" -eq 0 ] && set -- .
 
-mshow -t "$1" | awk -v "msg=$1" '
+mshow -t "$1" | DOS2UNIX='/
$/!s/$/
/' awk -v "msg=$1" '
 { match($0, "^ *"); indent = RLENGTH }
 $2 == "text/plain" { plain++ }
 $2 == "multipart/signed" { signed = 0+$1; si = indent; next }
@@ -20,7 +20,7 @@ END {
 		exit(100)
 	} else if (type == "application/pgp-signature") {
 		exit(system("mshow -r -O " q(msg) " " q(content) \
-			" | sed \"/
$/!s/$/
/\" | " \
+			" | sed $DOS2UNIX | " \
 			" { mshow -O " q(msg) " " q(signature) \
 			" | gpg --verify - /dev/fd/3; } 3<&0"))
 	} else if (type == "application/pkcs7-signature") {