about summary refs log tree commit diff
diff options
context:
space:
mode:
authorcodesoap <codesoap@mailbox.org>2021-01-04 18:55:48 +0100
committerLeah Neukirchen <leah@vuxu.org>2021-01-04 19:27:16 +0100
commit8ad63494bfc83fcb45aa94fe87a27e243bf590b4 (patch)
tree027cd948ce66f7ecf070e313e727e438a80715df
parentc525c0097e9927dafa2578b51e30ed2a5ec76759 (diff)
downloadmblaze-8ad63494bfc83fcb45aa94fe87a27e243bf590b4.tar.gz
mblaze-8ad63494bfc83fcb45aa94fe87a27e243bf590b4.tar.xz
mblaze-8ad63494bfc83fcb45aa94fe87a27e243bf590b4.zip
mcom: do not match shebang in needs_multipart()
Avoids matching lines like '#!/usr/bin/env sh'.

Closes: #196 [via git-merge-pr]
-rwxr-xr-xmcom2
1 files changed, 1 insertions, 1 deletions
diff --git a/mcom b/mcom
index f0de75c..c378b33 100755
--- a/mcom
+++ b/mcom
@@ -75,7 +75,7 @@ stripempty() {
 
 needs_multipart() {
 	mhdr -h attach "$1" >/dev/null ||
-		grep -q '^#[^ ]*/[^ ]* ' "$1"
+		grep -qE '^#[a-zA-Z]+/[a-zA-Z0-9+.;=#-]+ ' "$1"
 }
 
 do_mime() {