]> git.pld-linux.org Git - packages/JXplorer.git/blame - JXplorer.sh
- BR sed 4
[packages/JXplorer.git] / JXplorer.sh
CommitLineData
0ed41f8b 1#!/bin/sh
2
3JX_OPTS=-Djxplorer.config="$HOME/.JXplorer"
4JX_JAVADIR=/usr/share/java/JXplorer
5JX_DATADIR=/usr/share/JXplorer
6
7[ -r /etc/sysconfig/jxplorer ] && . /etc/sysconfig/jxplorer
8
9JAVA_BIN="$JAVA_HOME/bin/java"
10
11if ! [ -d "$HOME/.JXplorer" ]; then
12 mkdir "$HOME/.JXplorer"
13 cp /etc/JXplorer/connections.txt "$HOME/.JXplorer/connections.txt"
14 ln -s /etc/JXplorer/log4j.xml "$HOME/.JXplorer/log4j.xml"
15 ln -s /etc/JXplorer/jxconfig.txt "$HOME/.JXplorer/jxconfig.txt"
16fi
17
18echo "starting JXplorer..."
19echo
20FAIL=0
21cd "$JX_DATADIR"
22CLASSPATH=`build-classpath junit jhall`
23CLASSPATH="$CLASSPATH:$JX_JAVADIR/jxplorer.jar:$JX_JAVADIR/help.jar"
24export CLASSPATH
25if [ "$1" = "console" ] ; then
26 "$JAVA_BIN" $JX_OPTS com.ca.directory.jxplorer.JXplorer
27
28 if [ "$?" != "0" ]; then
29 FAIL=1
30 fi
31else
32 echo "Use \"$0 console\" if you want logging to the console"
33 "$JAVA_BIN" $JX_OPTS com.ca.directory.jxplorer.JXplorer >/dev/null 2>&1
34
35 if [ "$?" != "0" ]; then
36 FAIL=1
37 fi
38fi
39
40# Check for success
41if [ $FAIL = 0 ]; then
42 exit 0
43fi
44
45cat <<-!
46
47=========================
48JXplorer failed to start
49=========================
50Please ensure that you have appropriate "xhost" access to the machine you are
51running this from. Make sure the DISPLAY environment variable is set correctly.
52Otherwise, ask your Unix Systems Administrator for more information on running
53X Windows applications.
54
55If you require more information run "$0 console" and check the
56error produced.
57!
58
59exit 1
This page took 0.074409 seconds and 4 git commands to generate.