Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3207

The bin scripts should be able to run when DERBY_HOME is not set

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.4.1.3
    • Fix Version/s: 10.6.1.0
    • Component/s: Demos/Scripts
    • Labels:
      None

      Description

      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.

        Attachments

        1. d3207.stat
          0.5 kB
          Knut Anders Hatlen
        2. d3207.diff
          10 kB
          Knut Anders Hatlen

          Issue Links

            Activity

              People

              • Assignee:
                knutanders Knut Anders Hatlen
                Reporter:
                knutanders Knut Anders Hatlen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: