Adapt referenced filename in debian/links and debian/install.
[debian/jabref.git] / jabref
diff --git a/jabref b/jabref
index fd9ba89fb73fd244363d9d13d5f26a08e358b07c..8f8c3058c4e5838b6e9b8072f722ba6f6b7e16aa 100644 (file)
--- a/jabref
+++ b/jabref
@@ -3,13 +3,13 @@
 # jabref wrapper script
 # code for java detection borrowed from tuxguitar
 
-if [ -z $JAVA_HOME ]
-then
-t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
-t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t
-JAVA=${JAVA_HOME}/jre/bin/java
+if [ -z "$JAVA_HOME" ] ; then
+       t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
+       t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t
+       t=/usr/lib/jvm/java-7-icedtea && test -d $t && JAVA_HOME=$t
+       test -n "$JAVA_HOME" && JAVA=${JAVA_HOME}/jre/bin/java
 fi
 
 export JAVA=${JAVA:=java}
 
-$JAVA -jar /usr/share/java/jabref.jar "$@"
+exec $JAVA -jar /usr/share/java/jabref.jar "$@"