contrib/plan9/9mail
author André Sintzoff <andre.sintzoff@gmail.com>
Sun, 21 Jan 2018 15:39:48 +0100
changeset 35775 440e8fce29e7
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
cext: define MIN macro only if it is not yet defined MIN macro is defined in <sys/param.h> on macOS Sierra. Therefore as HAVE_BSD_STATFS is defined in osutil.c, 'MIN' macro redefined warning is emitted.

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