contrib/plan9/9mail
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 23 Feb 2023 04:36:19 +0100
changeset 50229 34db5692d537
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
narrow: open the transaction sooner when unbundling That way, the narrow spec changes will be done within a transaction.

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