db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3207) The bin scripts should be able to run when DERBY_HOME is not set
Date Thu, 15 Nov 2007 20:18:43 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542870
] 

Knut Anders Hatlen commented on DERBY-3207:
-------------------------------------------

The simple solution is to inline derby_common.sh in all the scripts. To avoid the cost of
maintaining duplicated code, I think it's best if we only have templates for the scripts in
the repository, and let ant do the inlining for us in the build process.

> 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.0.0
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>
> 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.


Mime
View raw message