# This script launches Jext, the Java text editor. # It checks for a $HOME/.jext directory and eventually creates it. # Next it checks for a /etc/jextrc and $JEXT_CONFFILE (~/.jext/variables) files which define the JEXT_HOME JAVA_CMD JAVA_OPT CLASSPATH and ToShow variables. The first is system wide(used in RPM install mainly), the second is per user. # If this file doesn't exist the script creates it by asking the options to the user. # Sharpshooter 23/02/2002 # Blaisorblade 18/11/2002 #For special cases about different config files(for developers with working #copy and an unstable one to be tested). if [ "$JEXT_CONFFILE" = "" ] then JEXT_CONFFILE=~/.jext/variables fi # Help if [ "$1" = "--help" -o "$1" = "-h" ] then echo "This script launch Jext the Java text editor." echo "Usage : $0 [--reconf] [files]" echo "--reconf doesn't start jext but clears the" echo " $JEXT_CONFFILE file with the settings to start jext" echo " (jext & java location and jext options)." exit 0 fi if [ "$1" = "--reconf" ] then echo "Clearing $JEXT_CONFFILE, you'll have to reenter jext & java \ interpreter location" rm -f "$JEXT_CONFFILE" exit 0 fi # Check for the user's ~/.jext directory. if ! [ -d ~/.jext ] then echo "It seems you don't have a .jext directory in your home dir." echo "I create it." echo mkdir -p ~/.jext/xinsert fi # Check for the $HOME/.jext/variables file. if ! [ -f $JEXT_CONFFILE -o -f /etc/jextrc ] then #Let's add some explaination in the config file. cat >$JEXT_CONFFILE <