home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / hugs101o.zip / Progs / HUGS / Scripts / hugs
Text File  |  1995-03-02  |  1KB  |  34 lines

  1. #!/bin/sh
  2. #
  3. # A simple shell script to invoke the Hugs interpreter and set the
  4. # path to the prelude file.
  5. #
  6. # Mark P. Jones, 1995.  Derived from the corresponding script for Gofer
  7. # which was written by Mark Jones and edited by Jonathan Bowen, Oxford
  8. # University, August 1993.
  9.  
  10. # Location of Hugs files - site specific
  11. ROOT=/usr/local/lib/hugs
  12.  
  13. # The location of your prelude file:
  14. HUGS=${HUGS-$ROOT/lib/hugs.prelude}
  15. export HUGS
  16.  
  17. # Preferred command line argument settings:
  18. HUGSARGS=${HUGSARGS-""}
  19.  
  20. # The next few lines try to guess a suitable setting for the EDITLINE
  21. # variable.  If your favourite editor is not dealt with here, or if
  22. # the version of sh that I'm using is incompatible with every other
  23. # shell out there, you may need to modify (or remove) this section:
  24. #
  25. EDIT=${VISUAL-${EDITOR-/usr/ucb/vi}}
  26. case `basename $EDIT` in
  27.     emacs | vi | elvis )  EDITLINE="$EDIT +%d %s"; export EDITLINE ;;
  28.     none               )  ;;
  29.     *                  )  EDITLINE=$EDIT; export EDITLINE ;;
  30. esac
  31.  
  32. # Finally, start the interpreter running:
  33. exec $ROOT/hugs $HUGSARGS $*
  34.