| 1 |
#! /bin/csh |
| 2 |
########################################################################## |
| 3 |
################# A C.elegans database ########################### |
| 4 |
################# R.Durbin and J.Thierry-Mieg ######################### |
| 5 |
################# ######################### |
| 6 |
################# Mailer script, Octobre 92 ######################### |
| 7 |
########################################################################## |
| 8 |
# $Id: acedb_mailer,v 1.3 1997/04/28 12:31:43 rd Exp $ |
| 9 |
# This script is invoked when using mail in the menu |
| 10 |
# of a keySet or of an Tree display, or a longText. |
| 11 |
|
| 12 |
# The idea is simply to extract the mail address from within |
| 13 |
# acedb of one or a keySet of people |
| 14 |
# Thus acedb acts as a general .aliases system |
| 15 |
|
| 16 |
# The script expects 2 parameters, |
| 17 |
# $1 is a list of email addresses, $2 a temp file name |
| 18 |
|
| 19 |
# A harmless header |
| 20 |
|
| 21 |
echo -n '// When you quit this editor,' >! /tmp/toto.mailer |
| 22 |
echo 'Acedb will mail this to' >> /tmp/toto.mailer |
| 23 |
echo $1 >> /tmp/toto.mailer |
| 24 |
|
| 25 |
# The text, so it can be edited |
| 26 |
|
| 27 |
cat $2 >> /tmp/toto.mailer |
| 28 |
\mv /tmp/toto.mailer $2 |
| 29 |
|
| 30 |
echo Editor: $EDITOR $2 |
| 31 |
|
| 32 |
# your favorite editor |
| 33 |
if ($?EDITOR) then |
| 34 |
echo starting $EDITOR $2 |
| 35 |
/bin/env $EDITOR $2 |
| 36 |
else |
| 37 |
if (-x emacs) then |
| 38 |
emacs $2 |
| 39 |
else |
| 40 |
vi $2 |
| 41 |
endif |
| 42 |
endif |
| 43 |
|
| 44 |
|
| 45 |
# when edited: mail and clean_up |
| 46 |
Mail -s acedb_mail $1 < $2 |
| 47 |
\rm $2 |
| 48 |
|
| 49 |
#echo 'done' |
| 50 |
|
| 51 |
|
| 52 |
|