leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
441 stars 48 forks source link

mcom(1): do_mime portability on macOS #162

Closed silby closed 5 years ago

silby commented 5 years ago

mcom(1)'s do_mime calls file -Lbi to get a mime-type for a file to be attached. On macOS, the -i option to the vendor's /usr/bin/file means something else, the flag to print a mime-type instead of the human-readable string from the magic file is -I (uppercase i). I'd propose a patch but I have no ideas offhand about how to handle this.

leahneukirchen commented 5 years ago

I think file --mime works on all systems (tried Linux, macOS, FreeBSD, OpenBSD).