Changeset 19769


Ignore:
Timestamp:
06/09/09 13:38:05 (11 years ago)
Author:
ak19
Message:
  1. Search4j was previously given a hint that assumed that findjava was working with GLI instead of a more general case (such as gs2-server.sh). Now it is uses GSDLHOME to work out the hint. 2. PROGNAME needs to be passed in as a parameter for display. The scripts gli.sh and client-gli.sh are now updated to pass PROGNAME (or PROGABBR) as an additional argument to findjava.sh. 3. Instead of merely testing whether the search4j file exists, Oran suggested testing whether search4j file exists AND is executable.
Location:
gli/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/client-gli.sh

    r19737 r19769  
    8686# call the script with source, so that we have the variables it sets ($javapath)
    8787exit_status=0
    88 source ./findjava.sh $glilang
     88source ./findjava.sh "$glilang" "$PROGABBR"
    8989exit_status=$?
    9090if [ "$exit_status" -eq 1 ]; then
  • gli/trunk/findjava.sh

    r19740 r19769  
    6767    # Give search4j a hint to find Java depending on the platform
    6868    if [ $GSDLOS = linux ]; then
    69     HINT=`cd ..;pwd`/packages/jre
     69    HINT=`cd $GSDLHOME;pwd`/packages/jre
    7070    elif [ $GSDLOS = darwin ]; then
    7171    HINT=/System/Library/Frameworks/JavaVM.framework/Home
     
    7373   
    7474    javapath="`"$SEARCH4J_EXECUTABLE" -e -p "$HINT" -m $MINIMUM_JAVA_VERSION`"
    75    
     75
    7676    if [ "$?" != "0" ]; then
    7777   
     
    120120#JAVA_HOME=
    121121gslang=$1
     122PROGNAME=$2
    122123MINIMUM_JAVA_VERSION=1.4.0_00
    123124MIN_DISPLAY_VERSION=1.4
     
    125126# sus out search4j
    126127# first look for compiled search4j executable inside the current folder
    127 if [ -f search4j ]; then
     128if [ -x search4j ]; then
    128129    SEARCH4J_EXECUTABLE=search4j   
    129 elif [ -e "$GSDLHOME/bin/$GSDLOS/search4j" ]; then
     130elif [ -x "$GSDLHOME/bin/$GSDLOS/search4j" ]; then
    130131    SEARCH4J_EXECUTABLE=$GSDLHOME/bin/$GSDLOS/search4j
    131 elif [ -e "$GSDL3SRCHOME/bin/$GSDLOS/search4j" ]; then
     132elif [ -x "$GSDL3SRCHOME/bin/$GSDLOS/search4j" ]; then
    132133    SEARCH4J_EXECUTABLE=$GSDL3SRCHOME/bin/search4j
    133 elif [ -e "../bin/$GSDLOS/search4j" ]; then
     134elif [ -x "../bin/$GSDLOS/search4j" ]; then
    134135    SEARCH4J_EXECUTABLE=../bin/$GSDLOS/search4j
    135 elif [ -e "../bin/search4j" ]; then
     136elif [ -x "../bin/search4j" ]; then
    136137    SEARCH4J_EXECUTABLE=../bin/search4j
    137138else
  • gli/trunk/gli.sh

    r19737 r19769  
    8282# call the script with source, so that we have the variables it sets ($javapath)
    8383exit_status=0
    84 source ./findjava.sh $glilang
     84source ./findjava.sh "$glilang" "$PROGNAME"
    8585exit_status=$?
    8686if [ "$exit_status" -eq 1 ]; then
Note: See TracChangeset for help on using the changeset viewer.