home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / CONTRIB / MBASE / MBASE50.TAR / mbase / src / mailscr < prev    next >
Encoding:
Text File  |  1992-10-02  |  1.7 KB  |  75 lines

  1. #!/bin/sh
  2. #
  3.  
  4. if [ -r /coherent ]
  5. then
  6.    if [ ":`cat /etc/domain 2> /dev/null`" = ":virtual" ]
  7.    then
  8.       richid="richid"
  9.    else
  10.       richid="mwcbbs!virtual!richid"
  11.    fi
  12. else
  13.    richid="richid@owlnet.rice.edu"
  14. fi
  15.  
  16. echo
  17. echo "MetalBase 5.0 is now installed.  Move to the directory ../sample and"
  18. echo "continue with the ../ReadMe file for a test run."
  19. echo
  20. echo "In order to see how much time I should spend developing this code, it"
  21. echo "would be helpful for me to know how many people got it.  There's also"
  22. echo "been talk of a mailing list, though I'm not sure I'm gonna start one."
  23. echo "May I send a message to $richid, telling him you've installed"
  24. echo -n "this code? [Yn] "
  25. ans=x
  26. while [ ":$ans" != ":yes" -a ":$ans" != ":no" ]
  27. do
  28.    read ans
  29.    if [ ":$ans" = ":Y" -o ":$ans" = ":y" -o ":$ans" = ":" ]; then
  30.       ans="yes"
  31.    fi
  32.    if [ ":$ans" = ":N" -o ":$ans" = ":n" ]; then
  33.       ans="no"
  34.    fi
  35. done
  36.  
  37. if [ ":$ans" = ":no" ]
  38. then
  39.    echo "Thanks anyway.  Enjoy the package."
  40. else
  41.    echo
  42.    echo "Thank you.  Just a moment..."
  43.  
  44.    if [ -r /usr/ucb/mail ]
  45.    then
  46.       /usr/ucb/mail -s "MetalBase 5.0 Installed" $richid << END
  47. MetalBase Version 5.0
  48. ---------------------
  49. Package installed on `date 2> /dev/null`:
  50.  
  51.    User         - $USER / $LOGNAME / `logname 2> /dev/null`
  52.    Architecture - `arch 2> /dev/null`
  53.    Uname/UUname - `uname -a 2> /dev/null`
  54.  
  55. END
  56.    else
  57.       opt=""
  58.  
  59.       mail $richid << END
  60. MetalBase Version 5.0
  61. ---------------------
  62. Package installed on `date 2> /dev/null`:
  63.  
  64.    User         - $USER / $LOGNAME / `logname 2> /dev/null`
  65.    Architecture - `arch 2> /dev/null`
  66.    Uname/UUname - `uname -a 2> /dev/null`
  67.  
  68. END
  69.    fi
  70.  
  71.    echo
  72.    echo "Mail sent.  Enjoy the package."
  73. fi
  74.  
  75.