Equivalent of Ubuntu’s write-mime-multipart? I would like to generate a multipart mime-encoded document for use as user data on EC2 instances.

On Ubuntu, one is supposed to use write-mime-multipart to do this, as per these instructions.

Does anyone know what would the OSX command-line equivalent be?

Thanks!
I’ve found a simple solution. Ubuntu’s write-mime-multipart command is actually a Python script, available here (or on an Ubuntu distro I guess).

I’ve simply downloaded this script to use. Perhaps not ideal with respect to version control, but okay for a simple script I think.

Better approaches welcome!