[ https://issues.apache.org/jira/browse/DERBY-3207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845313#action_12845313 ]
Knut Anders Hatlen commented on DERBY-3207: ------------------------------------------- I tested the patch by building the snapshot and release targets and verified that the scripts worked without DERBY_HOME in the following scenarios: 1) when the script was executed by specifying the full path (absolute or relative) on the command line 2) when invoking a symbolic link that pointed to one of the scripts 3) when having the bin directory in PATH and invoking the script without specifying full path Examples of the above scenarios copied from my terminal window: $ unset DERBY_HOME $ ./db-derby-snapshot-10.6.0.0-923109M/bin/ij ij version 10.6 ij> exit; $ ln -s db-derby-snapshot-10.6.0.0-923109M/bin/ij . $ ./ij ij version 10.6 ij> exit; $ export PATH=`pwd`/db-derby-snapshot-10.6.0.0-923109M/bin:$PATH $ ij ij version 10.6 ij> exit; > The bin scripts should be able to run when DERBY_HOME is not set > ---------------------------------------------------------------- > > Key: DERBY-3207 > URL: https://issues.apache.org/jira/browse/DERBY-3207 > Project: Derby > Issue Type: Improvement > Components: Demos/Scripts > Affects Versions: 10.4.1.3 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Minor > Attachments: d3207.diff, d3207.stat > > > The scripts under bin should be able to run without requiring the users to > set DERBY_HOME explicitly. The script derby_common.sh, which is sourced by > all the scripts under bin, contains code to detect DERBY_HOME based on the > value of $0, but since the scripts need to know DERBY_HOME in order to source > derby_common.sh, they still fail when DERBY_HOME is not set. > When I removed this part of bin/ij > ------- > if [ -z "$DERBY_HOME" ] ; then > echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment > variable" > echo "to the location of your Derby installation." > exit 1 > fi > . $DERBY_HOME/bin/derby_common.sh > ------- > and in-lined the code in derby_common.sh in its place, I was able to run ij > successfully by typing the command './bin/ij' without setting DERBY_HOME > first. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.