home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / web_dev / files / jext-install.exe / {app} / bin / jext < prev    next >
Encoding:
Text File  |  2001-06-19  |  2.4 KB  |  84 lines

  1. #!/bin/sh
  2. # Script for starting Jext on Unix.
  3. #
  4. # This version allows for an install in a central area like /usr/local/jext.
  5. # Set the JEXT_HOME to /usr/local/jext and add this to your PATH in
  6. # /etc/profile. Setting JAVA_HOME to the base of your Java JDK or JRE is
  7. # also a good idea as it helps Java find fonts and stuff.
  8.  
  9. # To allow an execution from a central place, please uncomment the lines
  10. # marked by the <PLUGINS> tag
  11.  
  12. # Original Author: Norbert Seidel
  13. # Modified by: Duncan Dickinson [06/12/2000]
  14. # Modified by: Yannis Delmas    [18/12/2000]
  15. # Modified by: Jonas De Vuyst   [20/12/2000]
  16.  
  17. # CVS info:
  18. # Author: $Author$
  19. # Date: $Date$
  20. # Revision: $Revision$
  21.  
  22. if [ "$1" = --help ] ; then
  23.     echo "This script loads the Jext editor."
  24.     echo "Usage: jext.sh [files]"
  25.     echo "Environment variables:"
  26.     echo "HOME:        home directory of user"
  27.     echo "JEXT_HOME:    Jext's base directory"
  28.     echo "JAVA_HOME:    Java implementation base directory"
  29.     echo "JAVA_CMD :      Java interpreter path"
  30.     echo "JAVA_OPTS:    options for the Java interpreter"
  31.     exit 0
  32. fi
  33.  
  34. # Guess for JEXT_HOME if not set already
  35. if [ -z "$JEXT_HOME" ] ; then
  36.     # strip "/bin/sometext" from script path
  37.     echo -n "You have not set the JEXT_HOME environment variable. "
  38.     JEXT_HOME="`echo "$0" | sed "s/\\/bin\\/[^\\/]*\$//"`"
  39.     echo "Assuming: $JEXT_HOME"
  40. fi
  41.  
  42. ##
  43. # START make sure all our directories are there
  44. ##
  45. if [ ! -d "$HOME/.jext" ]; then
  46.     # Create the Jext config directory
  47.     echo "Creating your configuration directory [~/.jext]"
  48.     mkdir -p $HOME/.jext/xinsert
  49. fi
  50.  
  51. # <PLUGINS>
  52. # uncomment for central execution
  53. # if [ ! -h "$HOME/.jext/plugins" ]; then
  54. #     # Add links to plugins
  55. #     ln -s $JEXT_HOME/bin/plugins $HOME/.jext
  56. # fi
  57.  
  58. #if [ ! -h "$HOME/templates" ]; then
  59. #    # Add links to templates
  60. #    ln -s $JEXT_HOME/bin/templates $HOME/
  61. #fi
  62.  
  63. ##
  64. # Directories are done
  65. ##
  66.      
  67. if [ "$JAVA_HOME" = "" ] ; then
  68.     echo "You have not set the JAVA_HOME environment variable."
  69.     echo "I'll still load Jext but you may encounter font warnings"
  70.     echo "and other nasties."
  71. fi
  72.  
  73. # Allows for those with varying JDKs and standard calls to java
  74. if [ -z "$JAVA_CMD" ] ; then
  75.    if [ -z "$JAVA_HOME" ] ; then
  76.       JAVA_CMD=java
  77.    else
  78.       JAVA_CMD="$JAVA_HOME/bin/java"
  79.    fi
  80.    JAVA_OPTS="" #"-Xms16m -Xmx32m"
  81. fi
  82.  
  83. exec "$JAVA_CMD" $JAVA_OPTS -classpath "$JEXT_HOME/lib/jext.jar":"$JEXT_HOME/lib/skinlf.jar" org.jext.Jext "$@"
  84.