Changeset 18559

Show
Ignore:
Timestamp:
20.02.2009 13:22:34 (11 years ago)
Author:
davidb
Message:

Now that we have Server2.java and Server3.java, updated to call the latter

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/gs3-server.sh

    r15132 r18559  
    44java_min_version=1.4.0_00 
    55 
     6autoset_gsdl_home() { 
     7 
     8  # remove leading ./ if present 
     9  prog=${0#./} 
     10 
     11  isrelative=${prog%%/*} 
     12 
     13  if [ ! -z $isrelative ] ; then 
     14    # some text is left after stripping 
     15    # => is relative 
     16    pwd=$PWD 
     17    prog="$pwd/$prog" 
     18  fi 
     19 
     20  fulldir=${prog%/*} 
     21 
     22  # remove trailing /. if present 
     23  eval $1=${fulldir%/.} 
     24} 
     25 
     26 
    627echo "Greenstone 3 Server" 
    7 echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
     28echo "Copyright (C) 2009, New Zealand Digital Library Project, University Of Waikato" 
    829echo "This software comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt" 
    930echo "This is free software, and you are welcome to redistribute it" 
     
    1132##  -------- Run the Greenstone 3 Server -------- 
    1233 
    13 # This script must be run from within the directory in which it lives 
    14 thisdir=`pwd` 
    15 if [ ! -f "${thisdir}/gs3-server.sh" ]; then 
    16     echo "This script must be run from the directory in which it resides." 
    17     exit 1 
    18 fi 
    1934 
    2035##  ---- Determine GSDL3SRCHOME ---- 
     
    2338# Some users may set the above line manually 
    2439if [ -z "$gsdl3path" ]; then 
    25    gsdl3path=`pwd`   
     40   autoset_gsdl_home gsdl3path 
    2641fi 
    2742 
     
    3752search4j -m $java_min_version &> /dev/null 
    3853if [ "$?" == "0" ]; then 
    39     `search4j -m $java_min_version -e` org.greenstone.server.Server $GSDL3SRCHOME  
     54    # In Java code, '...getResourceAsStream("build.properties")' 
     55    # needs up to be in the right directory when run 
     56    pushd $gsdl3path > /dev/null 
     57 
     58    javapath=`search4j -m $java_min_version -e`  
     59    $javapath org.greenstone.server.Server3 $GSDL3SRCHOME $serverlang 
     60 
     61    popd > /dev/null 
    4062fi 
    4163