contrib/plan9/9mail
author Matt Mackall <mpm@selenic.com>
Thu, 05 Nov 2015 17:09:00 -0600
changeset 26876 b8381832ce2b
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
posix: use getutf8char to handle OS X filename percent-escaping This replaces an open-coded utf-8 parser that was ignoring subtle issues like overlong encodings.

#!/bin/rc
# 9mail - Mercurial email wrapper for upas/marshal

fn usage {
	echo >[1=2] usage: mercurial/9mail -f from to [cc]
	exit usage
}

from=()
cc=()
to=()

switch($1){
case -f
	from=$2
case *
	usage
}

to=($3)
if(~ $#* 4)
	cc=(-C $4)

upasname=$from
upas/marshal $cc $to