contrib/plan9/9mail
author Pierre-Yves David <pierre-yves.david@fb.com>
Wed, 20 May 2015 11:55:59 -0500
changeset 25458 4642f0b803ae
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
sshpeer: also use doublepipe for client to server communication This will allow even more real time output when the server issue output in the middle a stream push.

#!/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