blob: ea5681724daf4e9d0bc65b06f2aa16729b7ff025 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#! /bin/sh
#
# This script launch the Jext the Java text editor.
# It checks for a $HOME/.jext directory and eventually creates it.
# Next it checks for a $HOME/.jext/variables file which define the JEXT_HOME JAVA_CMD and JAVA_OPT variables.
# If this file doesn't exist the script creates it by asking the options to the user.
# Sharpshooter 23/02/2002
# Modified by Todd Berman <tberman@gentoo.org> 23/05/2003
# Help
if [ "$1" = "--help" ]
then
echo "This script launch Jext the Java text editor."
echo "Usage : $0 [files]"
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/variables ]
then
echo "JEXT_HOME="/usr/share/jext/lib > ~/.jext/variables
echo "JAVA_CMD=java" >>~/.jext/variables
fi
# Extract the contents of the ~/.jext/variables file.
JEXT_HOME=`grep JEXT_HOME ~/.jext/variables | cut -f2 -d=`
JAVA_CMD=`grep JAVA_CMD ~/.jext/variables | cut -f2 -d=`
JAVA_OPT=`grep JAVA_OPT ~/.jext/variables | cut -f2 -d=`
# Launch JEXT
exec "$JAVA_CMD" $JAVA_OPTS -Dpython=`java-config --classpath=jython` -classpath "`java-config --classpath=jython,jext`" org.jext.Jext "$@"
|