http://svn.greenstone.org/greenstone3/trunk/gs3-server.sh
|
Revision 15132, 1.1 kB
(checked in by oranfry, 8 months ago)
|
don't try to run java unless search4j has found it
|
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
#!/bin/sh |
|---|
| 2 |
serverlang=en |
|---|
| 3 |
|
|---|
| 4 |
java_min_version=1.4.0_00 |
|---|
| 5 |
|
|---|
| 6 |
echo "Greenstone 3 Server" |
|---|
| 7 |
echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" |
|---|
| 8 |
echo "This software comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt" |
|---|
| 9 |
echo "This is free software, and you are welcome to redistribute it" |
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 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 |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
gsdl3path= |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
if [ -z "$gsdl3path" ]; then |
|---|
| 25 |
gsdl3path=`pwd` |
|---|
| 26 |
fi |
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
if [ -z "$GSDL3SRCHOME" ]; then |
|---|
| 30 |
pushd $gsdl3path > /dev/null |
|---|
| 31 |
source gs3-setup.sh |
|---|
| 32 |
popd > /dev/null |
|---|
| 33 |
fi |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
search4j -m $java_min_version &> /dev/null |
|---|
| 38 |
if [ "$?" == "0" ]; then |
|---|
| 39 |
`search4j -m $java_min_version -e` org.greenstone.server.Server $GSDL3SRCHOME |
|---|
| 40 |
fi |
|---|
| 41 |
|
|---|