X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2066fc1f0d6f122ddec169390f8b4b3d78980079..a376784b51d76aee169b9f358bc7ccef9d70a04a:/test/mhmail/test-mhmail diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index df921b6d..27188c77 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -21,12 +21,9 @@ content_type_string() { echo "text/plain; name=\"`basename $1`\"; charset=\"us-ascii\"" else # 1) Excise leading filename followed by : and any whitespace. - # 2) Insert semicolon if there isn't one before the first space. - # OpenBSD file --mime spits out things like "text/plain charset=...". - # 3) Wrap charset value in double quotes. Assume that it isn't already. - printf "%s %s%s" \ - `$MIMETYPEPROC $1 | sed -e 's/.*: *//' -e 's/\([^;]\) /\1; /' \ - -e 's/\(charset=\)\(.*\)/\1"\2"/'` "; name=\"`basename $1`\"" + # 2) Wrap charset value in double quotes. Assume that it isn't already. + printf "%s%s" \ + `$MIMETYPEPROC $1` "; name=\"`basename $1`\"; charset=\"us-ascii\"" fi }