contrib/plan9/9mail
author Boris Feld <boris.feld@octobus.net>
Thu, 10 Jan 2019 04:35:48 +0100
changeset 41162 cc1f545c4075
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
discovery: re-adjust a conditional wrongly changed In 71b0db4fa027 we updated this conditional to `<=`. As Yuya Nishihara pointed out, this was wrong.

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