SOURCES: JXplorer.sh - use jpackage instead of ugly hacks

pawelz pawelz at pld-linux.org
Tue Aug 12 17:10:57 CEST 2008


Author: pawelz                       Date: Tue Aug 12 15:10:57 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use jpackage instead of ugly hacks

---- Files affected:
SOURCES:
   JXplorer.sh (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/JXplorer.sh
diff -u SOURCES/JXplorer.sh:1.3 SOURCES/JXplorer.sh:1.4
--- SOURCES/JXplorer.sh:1.3	Sat Aug  2 14:42:26 2008
+++ SOURCES/JXplorer.sh	Tue Aug 12 17:10:51 2008
@@ -1,12 +1,13 @@
 #!/bin/sh
 
-JX_OPTS=-Djxplorer.config="$HOME/.JXplorer"
+! [ -r /usr/share/java-utils/java-functions ] && exit 1
+
+. /usr/share/java-utils/java-functions 
+
+OPTIONS=-Djxplorer.config="$HOME/.JXplorer"
 JX_JAVADIR=/usr/share/java/JXplorer
 JX_DATADIR=/usr/share/JXplorer
 
-# Get config.
-[ -f /etc/sysconfig/jxplorer ] && . /etc/sysconfig/jxplorer
-
 JAVA_BIN="$JAVA_HOME/bin/java"
 
 if ! [ -d "$HOME/.JXplorer" ]; then
@@ -19,14 +20,12 @@
 fi
 
 cd "$HOME/.JXplorer"
-CLASSPATH=`build-classpath junit jhall`
-CLASSPATH="$CLASSPATH:$JX_JAVADIR/jxplorer.jar:$JX_JAVADIR/help.jar"
-export CLASSPATH
+CLASSPATH=`build-classpath junit jhall JXplorer`
 
 if [ "$#" == "0" ]; then
-    exec "$JAVA_BIN" $JX_OPTS com.ca.directory.jxplorer.JXplorer < /dev/null > /dev/null 2>&1 &
+    run com.ca.directory.jxplorer.JXplorer < /dev/null > /dev/null 2>&1 &
   else if [ "$1" = "console" ] ; then
-    exec "$JAVA_BIN" $JX_OPTS com.ca.directory.jxplorer.JXplorer
+    run com.ca.directory.jxplorer.JXplorer
   else
     echo "Usage: $0 [console|help]"
   fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/JXplorer.sh?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list