]> git.pld-linux.org Git - packages/JXplorer.git/commitdiff
- Script for running JXplorer
authorpawelz <pawelz@pld-linux.org>
Wed, 16 Jul 2008 20:26:02 +0000 (20:26 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    JXplorer.sh -> 1.1

JXplorer.sh [new file with mode: 0644]

diff --git a/JXplorer.sh b/JXplorer.sh
new file mode 100644 (file)
index 0000000..cedb518
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+JX_OPTS=-Djxplorer.config="$HOME/.JXplorer"
+JX_JAVADIR=/usr/share/java/JXplorer
+JX_DATADIR=/usr/share/JXplorer
+
+[ -r /etc/sysconfig/jxplorer ] && . /etc/sysconfig/jxplorer
+
+JAVA_BIN="$JAVA_HOME/bin/java"
+
+if ! [ -d "$HOME/.JXplorer" ]; then
+  mkdir "$HOME/.JXplorer"
+  cp /etc/JXplorer/connections.txt "$HOME/.JXplorer/connections.txt"
+  ln -s /etc/JXplorer/log4j.xml "$HOME/.JXplorer/log4j.xml"
+  ln -s /etc/JXplorer/jxconfig.txt "$HOME/.JXplorer/jxconfig.txt"
+fi
+
+echo "starting JXplorer..."
+echo
+FAIL=0
+cd "$JX_DATADIR"
+CLASSPATH=`build-classpath junit jhall`
+CLASSPATH="$CLASSPATH:$JX_JAVADIR/jxplorer.jar:$JX_JAVADIR/help.jar"
+export CLASSPATH
+if [ "$1" = "console" ] ; then
+    "$JAVA_BIN" $JX_OPTS com.ca.directory.jxplorer.JXplorer
+
+    if [ "$?" != "0" ]; then
+        FAIL=1
+    fi
+else
+    echo "Use \"$0 console\" if you want logging to the console"
+    "$JAVA_BIN" $JX_OPTS com.ca.directory.jxplorer.JXplorer  >/dev/null 2>&1
+
+    if [ "$?" != "0" ]; then
+        FAIL=1
+    fi
+fi
+
+# Check for success
+if [ $FAIL = 0 ]; then
+    exit 0
+fi
+
+cat <<-!
+
+=========================
+JXplorer failed to start
+=========================
+Please ensure that you have appropriate "xhost" access to the machine you are
+running this from. Make sure the DISPLAY environment variable is set correctly.
+Otherwise, ask your Unix Systems Administrator for more information on running
+X Windows applications.
+
+If you require more information run "$0 console" and check the
+error produced.
+!
+
+exit 1
This page took 0.108545 seconds and 4 git commands to generate.