Changeset 30113

Show
Ignore:
Timestamp:
20.08.2015 18:04:44 (4 years ago)
Author:
ak19
Message:

Set JRE_HOME not JAVA_HOME if using the jre included packages

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/gs3-setup.sh

    r30106 r30113  
    204204  #otherwise manually try the hint 
    205205  elif [ -d "$HINT" ]; then 
    206       #found a suitible java 
     206      #found a suitable java 
    207207      setupJavaAt "$HINT" 
    208208 
     
    229229 
    230230function setupJavaAt() { 
    231   export JAVA_HOME="$1" 
    232   addtopath PATH "$JAVA_HOME/bin" 
    233   echo "  - Exported JAVA_HOME to $JAVA_HOME" 
     231  if [[ $1 == *"/jre"* ]]; then 
     232    export JRE_HOME="$1" 
     233    addtopath PATH "$JRE_HOME/bin" 
     234    echo "  - Exported JRE_HOME to $JRE_HOME" 
     235  else 
     236    export JAVA_HOME="$1" 
     237    addtopath PATH "$JAVA_HOME/bin" 
     238    echo "  - Exported JAVA_HOME to $JAVA_HOME" 
     239  fi 
    234240} 
    235241