Update of /cvsroot/squirrel-sql/sql12/build/plainzip
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19740/build/plainzip
Modified Files:
squirrel-sql.sh
Log Message:
Bugfix 2939376: Documented the algorithm for finding the java executable to use and made the logic less terse/confusing. Merged the case statements into one case statement.
Index: squirrel-sql.sh
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/build/plainzip/squirrel-sql.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** squirrel-sql.sh 4 Aug 2009 11:05:23 -0000 1.5
--- squirrel-sql.sh 7 Feb 2010 22:16:37 -0000 1.6
***************
*** 1,14 ****
! `#! /bin/sh
! [ ${JAVA_HOME} ] && JAVA=${JAVA_HOME}/bin/java || JAVA=java
! # Are we running within Cygwin on some version of Windows?
cygwin=false;
macosx=false;
-
- case "`uname -s`" in
- CYGWIN*) cygwin=true ;;
- esac
case "`uname -s`" in
! Darwin) macosx=true;;
esac
--- 1,31 ----
! #! /bin/sh
! # IZPACK_JAVA_HOME is filtered in by the IzPack installer when this script is installed
! IZPACK_JAVA_HOME=%JAVA_HOME
!
! # We detect the java executable to use according to the following algorithm:
! #
! # 1. If it is located in JAVA_HOME, then we use that; or
! # 2. If the one used by the IzPack installer is available then use that, otherwise
! # 3. Use the java that is in the command path.
! #
! if [ -d "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
! JAVACMD="$JAVA_HOME/bin/java"
! elif [ -d "$IZPACK_JAVA_HOME" -a -x "$IZPACK_JAVA_HOME/bin/java" ]; then
! JAVACMD="$IZPACK_JAVA_HOME/bin/java"
! else
! JAVACMD=java
! fi
!
! # Are we running within Cygwin on some version of Windows or on Mac OS X?
cygwin=false;
macosx=false;
case "`uname -s`" in
! CYGWIN*)
! cygwin=true
! ;;
! Darwin*)
! macosx=true
! ;;
esac
***************
*** 37,41 ****
# minimum acceptable version (first arg) and any other acceptable subsequent versions. <MAJOR>.<MINOR> should
# be all that is necessary for the version form.
! $JAVA -cp "$UNIX_STYLE_HOME/lib/versioncheck.jar" JavaVersionChecker 1.6 1.7
if [ "$?" = "1" ]; then
exit
--- 54,58 ----
# minimum acceptable version (first arg) and any other acceptable subsequent versions. <MAJOR>.<MINOR> should
# be all that is necessary for the version form.
! $JAVACMD -cp "$UNIX_STYLE_HOME/lib/versioncheck.jar" JavaVersionChecker 1.6 1.7
if [ "$?" = "1" ]; then
exit
***************
*** 78,82 ****
# Check for updates and prompt to apply if any are available
if [ -f "$UNIX_STYLE_HOME/update/downloads/core/squirrel-sql.jar" -a -f "$UNIX_STYLE_HOME/update/changeList.xml" ]; then
! $JAVA -cp "$UPDATE_CP" $MACOSX_UPDATER_PROPS -Dlog4j.defaultInitOverride=true -Dprompt=true net.sourceforge.squirrel_sql.client.update.gui.installer.PreLaunchUpdateApplication -l "$UNIX_STYLE_HOME/update-log4j.properties"
fi
--- 95,99 ----
# Check for updates and prompt to apply if any are available
if [ -f "$UNIX_STYLE_HOME/update/downloads/core/squirrel-sql.jar" -a -f "$UNIX_STYLE_HOME/update/changeList.xml" ]; then
! $JAVACMD -cp "$UPDATE_CP" $MACOSX_UPDATER_PROPS -Dlog4j.defaultInitOverride=true -Dprompt=true net.sourceforge.squirrel_sql.client.update.gui.installer.PreLaunchUpdateApplication -l "$UNIX_STYLE_HOME/update-log4j.properties"
fi
***************
*** 89,91 ****
# Launch SQuirreL application
! $JAVA -Xmx256m -cp "$TMP_CP" $MACOSX_SQUIRREL_PROPS net.sourceforge.squirrel_sql.client.Main --log-config-file "$UNIX_STYLE_HOME"/log4j.properties --squirrel-home "$UNIX_STYLE_HOME" $NATIVE_LAF_PROP $SCRIPT_ARGS
--- 106,108 ----
# Launch SQuirreL application
! $JAVACMD -Xmx256m -cp "$TMP_CP" $MACOSX_SQUIRREL_PROPS net.sourceforge.squirrel_sql.client.Main --log-config-file "$UNIX_STYLE_HOME"/log4j.properties --squirrel-home "$UNIX_STYLE_HOME" $NATIVE_LAF_PROP $SCRIPT_ARGS
|