home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / b / bbux.zip / INSTALL < prev    next >
Text File  |  1992-06-19  |  1KB  |  67 lines

  1. :
  2. # Installation script for multiport serial IO XENIX/UNIX driver.
  3. # Copyright (c) 1992, Boca Research, Inc.
  4.  
  5. PATH=/etc:/bin:/usr/bin
  6. LANG=english_us.ascii
  7. export PATH LANG
  8.  
  9. : ${OK=0} ${FAIL=1} ${TRUE=0} ${FALSE=1}
  10.  
  11. # Function Definitions
  12. #########################
  13.  
  14. # ---------- STANDARD ROUTINES -------- These routines are commen to scripts
  15. #                    requiring kernel relinking.
  16. # Define traps for critical and non critical code.
  17. set_trap ()  {    
  18.     trap 'echo "\nInterrupted! Exiting ..."; cleanup 1' 1 2 3 15
  19. }
  20.  
  21. unset_trap ()  {
  22.     trap '' 1 2 3 15
  23. }
  24.  
  25. # Remove temp files and exit with the status passed as argument
  26. cleanup () {
  27.     trap '' 1 2 3 15
  28.     [ "$tmp" ] && rm -f $tmp*
  29.     exit $1
  30. }
  31.  
  32. # Print an error message
  33. error () {
  34.     echo "\nError: $*" >&2
  35.     return $FAIL
  36. }
  37.  
  38. # Determine operating system
  39. get_os () {
  40.     OSVER=`uname -r`
  41.     case "$OSVER" in
  42.         3.2* ) OS=unix; CONFDIR=/etc/conf/cf.d ;;
  43.         2.[23]* ) OS=xenix; CONFDIR=/usr/sys/conf ;;
  44.         *)  error "Cannot determine operating system release"
  45.             return $FAIL ;;
  46.     esac
  47.     return $OK
  48. }
  49.  
  50. # main
  51.  
  52. PREVDIR=`pwd`
  53. cd /
  54. get_os || cleanup $FAIL
  55.  
  56. drv=`echo $1 | tr -d ":"`
  57. if [ "$OS" = "unix" ]
  58. then
  59.     doscp -r ${drv:-/dev/install}:/sco_unix.tar /tmp/bb.tar
  60. else
  61.     doscp -r ${drv:-/dev/install}:/xenix.tar /tmp/bb.tar
  62. fi
  63. tar xvf /tmp/bb.tar
  64. mkdev bocaboard
  65. cd $PREVDIR
  66.  
  67.