jets3t (0.8.1+dfsg-1) 06_fix_scripts.diff

Summary

 bin/cockpit.sh     |   30 +++++++++++++++++-------------
 bin/cockpitlite.sh |   28 ++++++++++++++++------------
 bin/synchronize.sh |   26 +++++++++++++++-----------
 bin/uploader.sh    |   26 +++++++++++++++-----------
 4 files changed, 63 insertions(+), 47 deletions(-)

    
download this patch

Patch contents

Author: Miguel Landaeta <miguel@miguel.cc>
Subject: set correct location of libraries in jets3t scripts
Forwarded: no
Last-Update: 2010-04-13

This patch set the location of default JAVA_HOME and the location of some
needed libraries in jets3t scripts.

--- jets3t-0.8.1+dfsg.orig/bin/synchronize.sh
+++ jets3t-0.8.1+dfsg/bin/synchronize.sh
@@ -8,7 +8,7 @@
 #              Java Development Kit to use. 
 # -------------------------------------------------------------------
 
-: ${JETS3T_HOME:-""}
+: ${JETS3T_HOME:="/usr/share/jets3t"}
 : ${JAVA_HOME:-""}
 
 # Check the JETS3T_HOME directory
@@ -33,8 +33,9 @@ if [ -z "$JAVA_HOME" ]; then
   # Test whether the 'java' program is available in the system path.
   java -version 2> /dev/null
   if [ $? -gt 0 ]; then
-    echo "Please set the environment variable JAVA_HOME"
-    exit 1
+    #echo "Please set the environment variable JAVA_HOME"
+    #exit 1
+    export JAVA_HOME="/usr/lib/jvm/default-java"
   else
     EXEC=java
   fi
@@ -50,15 +51,18 @@ CP=$CLASSPATH:$JETS3T_HOME/configs
 # Include resources directory in classpath
 CP=$CP:$JETS3T_HOME/resources
 
+# System libraries path
+: ${JAVA_LIBS:="/usr/share/java"}
+
 # Include libraries in classpath
-CP=$CP:$JETS3T_HOME/jars/jets3t-0.8.1.jar
-CP=$CP:$JETS3T_HOME/jars/synchronize-0.8.1.jar
-CP=$CP:$JETS3T_HOME/libs/commons-logging/commons-logging-1.1.1.jar
-CP=$CP:$JETS3T_HOME/libs/commons-codec/commons-codec-1.3.jar
-CP=$CP:$JETS3T_HOME/libs/commons-httpclient/commons-httpclient-3.1.jar
-CP=$CP:$JETS3T_HOME/libs/logging-log4j/log4j-1.2.15.jar
-CP=$CP:$JETS3T_HOME/libs/bouncycastle/bcprov-jdk14-138.jar
-CP=$CP:$JETS3T_HOME/libs/java-xmlbuilder/java-xmlbuilder-0.4.jar
+CP=$CP:$JAVA_LIBS/jets3t.jar
+CP=$CP:$JAVA_LIBS/jets3t-synchronize.jar
+CP=$CP:$JAVA_LIBS/commons-logging.jar
+CP=$CP:$JAVA_LIBS/commons-codec.jar
+CP=$CP:$JAVA_LIBS/commons-httpclient.jar
+CP=$CP:$JAVA_LIBS/log4j-1.2.jar
+CP=$CP:$JAVA_LIBS/bcprov.jar
+CP=$CP:$JAVA_LIBS/java-xmlbuilder.jar
 
 # Convert classpath for cygwin bash
 case "`uname -s`" in
--- jets3t-0.8.1+dfsg.orig/bin/cockpit.sh
+++ jets3t-0.8.1+dfsg/bin/cockpit.sh
@@ -8,7 +8,7 @@
 #              Java Development Kit to use. 
 # -------------------------------------------------------------------
 
-: ${JETS3T_HOME:-""}
+: ${JETS3T_HOME:="/usr/share/jets3t"}
 : ${JAVA_HOME:-""}
 
 # Check the JETS3T_HOME directory
@@ -33,8 +33,9 @@ if [ -z "$JAVA_HOME" ]; then
   # Test whether the 'java' program is available in the system path.
   java -version 2> /dev/null
   if [ $? -gt 0 ]; then
-    echo "Please set the environment variable JAVA_HOME"
-    exit 1
+    #echo "Please set the environment variable JAVA_HOME"
+    #exit 1
+    export JAVA_HOME="/usr/lib/jvm/default-java"
   else
     EXEC=java
   fi
@@ -50,17 +51,20 @@ CP=$CLASSPATH:$JETS3T_HOME/configs
 # Include resources directory in classpath
 CP=$CP:$JETS3T_HOME/resources
 
+# System libraries path
+: ${JAVA_LIBS:="/usr/share/java"}
+
 # Include libraries in classpath
-CP=$CP:$JETS3T_HOME/jars/jets3t-0.8.1.jar
-CP=$CP:$JETS3T_HOME/jars/jets3t-gui-0.8.1.jar
-CP=$CP:$JETS3T_HOME/jars/cockpit-0.8.1.jar
-CP=$CP:$JETS3T_HOME/libs/commons-logging/commons-logging-1.1.1.jar
-CP=$CP:$JETS3T_HOME/libs/commons-codec/commons-codec-1.3.jar
-CP=$CP:$JETS3T_HOME/libs/commons-httpclient/commons-httpclient-3.1.jar
-CP=$CP:$JETS3T_HOME/libs/misc/BareBonesBrowserLaunch.jar
-CP=$CP:$JETS3T_HOME/libs/logging-log4j/log4j-1.2.15.jar
-CP=$CP:$JETS3T_HOME/libs/bouncycastle/bcprov-jdk14-138.jar
-CP=$CP:$JETS3T_HOME/libs/java-xmlbuilder/java-xmlbuilder-0.4.jar
+CP=$CP:$JAVA_LIBS/jets3t.jar
+CP=$CP:$JAVA_LIBS/jets3t-gui.jar
+CP=$CP:$JAVA_LIBS/jets3t-cockpit.jar
+CP=$CP:$JAVA_LIBS/jets3t-deps.jar
+CP=$CP:$JAVA_LIBS/commons-logging.jar
+CP=$CP:$JAVA_LIBS/commons-codec.jar
+CP=$CP:$JAVA_LIBS/commons-httpclient.jar
+CP=$CP:$JAVA_LIBS/log4j-1.2.jar
+CP=$CP:$JAVA_LIBS/bcprov.jar
+CP=$CP:$JAVA_LIBS/java-xmlbuilder.jar
 
 # Convert classpath for cygwin bash
 case "`uname -s`" in
--- jets3t-0.8.1+dfsg.orig/bin/cockpitlite.sh
+++ jets3t-0.8.1+dfsg/bin/cockpitlite.sh
@@ -8,7 +8,7 @@
 #              Java Development Kit to use. 
 # -------------------------------------------------------------------
 
-: ${JETS3T_HOME:-""}
+: ${JETS3T_HOME:="/usr/share/jets3t"}
 : ${JAVA_HOME:-""}
 
 # Check the JETS3T_HOME directory
@@ -33,8 +33,9 @@ if [ -z "$JAVA_HOME" ]; then
   # Test whether the 'java' program is available in the system path.
   java -version 2> /dev/null
   if [ $? -gt 0 ]; then
-    echo "Please set the environment variable JAVA_HOME"
-    exit 1
+    #echo "Please set the environment variable JAVA_HOME"
+    #exit 1
+    export JAVA_HOME="/usr/lib/jvm/default-java"
   else
     EXEC=java
   fi
@@ -50,16 +51,19 @@ CP=$CLASSPATH:$JETS3T_HOME/configs
 # Include resources directory in classpath
 CP=$CP:$JETS3T_HOME/resources
 
+# System libraries path
+: ${JAVA_LIBS:="/usr/share/java"}
+
 # Include libraries in classpath
-CP=$CP:$JETS3T_HOME/jars/jets3t-0.8.1.jar
-CP=$CP:$JETS3T_HOME/jars/jets3t-gui-0.8.1.jar
-CP=$CP:$JETS3T_HOME/jars/cockpitlite-0.8.1.jar
-CP=$CP:$JETS3T_HOME/libs/commons-logging/commons-logging-1.1.1.jar
-CP=$CP:$JETS3T_HOME/libs/commons-codec/commons-codec-1.3.jar
-CP=$CP:$JETS3T_HOME/libs/commons-httpclient/commons-httpclient-3.1.jar
-CP=$CP:$JETS3T_HOME/libs/misc/BareBonesBrowserLaunch.jar
-CP=$CP:$JETS3T_HOME/libs/logging-log4j/log4j-1.2.15.jar
-CP=$CP:$JETS3T_HOME/libs/bouncycastle/bcprov-jdk14-138.jar
+CP=$CP:$JAVA_LIBS/jets3t.jar
+CP=$CP:$JAVA_LIBS/jets3t-gui.jar
+CP=$CP:$JAVA_LIBS/jets3t-cockpitlite.jar
+CP=$CP:$JAVA_LIBS/jets3t-deps.jar
+CP=$CP:$JAVA_LIBS/commons-logging.jar
+CP=$CP:$JAVA_LIBS/commons-codec.jar
+CP=$CP:$JAVA_LIBS/commons-httpclient.jar
+CP=$CP:$JAVA_LIBS/log4j-1.2.jar
+CP=$CP:$JAVA_LIBS/bcprov.jar
 
 # Convert classpath for cygwin bash
 case "`uname -s`" in
--- jets3t-0.8.1+dfsg.orig/bin/uploader.sh
+++ jets3t-0.8.1+dfsg/bin/uploader.sh
@@ -8,7 +8,7 @@
 #              Java Development Kit to use. 
 # -------------------------------------------------------------------
 
-: ${JETS3T_HOME:-""}
+: ${JETS3T_HOME:="/usr/share/jets3t"}
 : ${JAVA_HOME:-""}
 
 # Check the JETS3T_HOME directory
@@ -33,8 +33,9 @@ if [ -z "$JAVA_HOME" ]; then
   # Test whether the 'java' program is available in the system path.
   java -version 2> /dev/null
   if [ $? -gt 0 ]; then
-    echo "Please set the environment variable JAVA_HOME"
-    exit 1
+    #echo "Please set the environment variable JAVA_HOME"
+    #exit 1
+    export JAVA_HOME="/usr/lib/jvm/default-java"
   else
     EXEC=java
   fi
@@ -50,15 +51,18 @@ CP=$CLASSPATH:$JETS3T_HOME/configs
 # Include resources directory in classpath
 CP=$CP:$JETS3T_HOME/resources
 
+# System libraries path
+: ${JAVA_LIBS:="/usr/share/java"}
+
 # Include libraries in classpath
-CP=$CP:$JETS3T_HOME/jars/jets3t-0.8.1.jar
-CP=$CP:$JETS3T_HOME/jars/jets3t-gui-0.8.1.jar
-CP=$CP:$JETS3T_HOME/jars/uploader-0.8.1.jar
-CP=$CP:$JETS3T_HOME/libs/commons-logging/commons-logging-1.1.1.jar
-CP=$CP:$JETS3T_HOME/libs/commons-codec/commons-codec-1.3.jar
-CP=$CP:$JETS3T_HOME/libs/commons-httpclient/commons-httpclient-3.1.jar
-CP=$CP:$JETS3T_HOME/libs/misc/BareBonesBrowserLaunch.jar
-CP=$CP:$JETS3T_HOME/libs/logging-log4j/log4j-1.2.15.jar
+CP=$CP:$JAVA_LIBS/jets3t.jar
+CP=$CP:$JAVA_LIBS/jets3t-gui.jar
+CP=$CP:$JAVA_LIBS/jets3t-uploader.jar
+CP=$CP:$JAVA_LIBS/jets3t-deps.jar
+CP=$CP:$JAVA_LIBS/commons-logging.jar
+CP=$CP:$JAVA_LIBS/commons-codec.jar
+CP=$CP:$JAVA_LIBS/commons-httpclient.jar
+CP=$CP:$JAVA_LIBS/log4j-1.2.jar
 
 # Convert classpath for cygwin bash
 case "`uname -s`" in