contrib/plan9/9mail
raw| 1 | #!/bin/rc |
| 2 | # 9mail - Mercurial email wrapper for upas/marshal |
| 3 | |
| 4 | fn usage { |
| 5 | echo >[1=2] usage: mercurial/9mail -f from to [cc] |
| 6 | exit usage |
| 7 | } |
| 8 | |
| 9 | from=() |
| 10 | cc=() |
| 11 | to=() |
| 12 | |
| 13 | switch($1){ |
| 14 | case -f |
| 15 | from=$2 |
| 16 | case * |
| 17 | usage |
| 18 | } |
| 19 | |
| 20 | to=($3) |
| 21 | if(~ $#* 4) |
| 22 | cc=(-C $4) |
| 23 | |
| 24 | upasname=$from |
| 25 | upas/marshal $cc $to |
| 26 |