[22064] | 1 | #!/bin/bash
|
---|
[18109] | 2 | gailang=en
|
---|
| 3 |
|
---|
| 4 | echo
|
---|
| 5 | echo "Greenstone Administrator Interface (GAI)"
|
---|
| 6 | echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
|
---|
| 7 | echo "GAI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt"
|
---|
| 8 | echo "This is free software, and you are welcome to redistribute it"
|
---|
| 9 | echo
|
---|
| 10 |
|
---|
| 11 | ## -------- Run the Greenstone Administrator Interface --------
|
---|
[22005] | 12 | # Need to run this script from its own directory instead of whichever directory it may be called from
|
---|
[18109] | 13 |
|
---|
[22005] | 14 | thisdir="`dirname \"$0\"`"
|
---|
| 15 | thisdir="`cd \"$thisdir\" && pwd`"
|
---|
| 16 | cd "$thisdir"
|
---|
[18109] | 17 |
|
---|
| 18 | ## ---- Determine GSDL3HOME ----
|
---|
| 19 | gsdl3path=
|
---|
| 20 |
|
---|
| 21 | # Some users may set the above line manually
|
---|
| 22 | if [ "$gsdl3path" == "" ]; then
|
---|
| 23 | # Check the environment variable first
|
---|
| 24 | if [ "$GSDL3SRCHOME" != "" ]; then
|
---|
| 25 | gsdl3path=$GSDL3SRCHOME
|
---|
| 26 |
|
---|
| 27 | # If it is not set, assume that the GAI is installed as a subdirectory of Greenstone
|
---|
| 28 | else
|
---|
[18204] | 29 | pushd .. > /dev/null
|
---|
[18109] | 30 | gsdl3path=`pwd`
|
---|
[18204] | 31 | popd > /dev/null
|
---|
[18109] | 32 | fi
|
---|
| 33 | fi
|
---|
| 34 |
|
---|
| 35 | # Setup Greenstone3, unless it has already been done
|
---|
| 36 | if [ "$GSDL3HOME" == "" ]; then
|
---|
| 37 | pushd $gsdl3path > /dev/null
|
---|
| 38 | source gs3-setup.sh
|
---|
| 39 | popd > /dev/null
|
---|
| 40 | fi
|
---|
| 41 |
|
---|
| 42 | # Other arguments you can provide to GLI to work around memory limitations, or debug
|
---|
| 43 | # -Xms<number>M To set minimum memory (by default 32MB)
|
---|
| 44 | # -Xmx<number>M To set maximum memory (by default the nearest 2^n to the total remaining physical memory)
|
---|
| 45 | # -verbose:gc To set garbage collection messages
|
---|
| 46 | # -Xincgc For incremental garbage collection (significantly slows performance)
|
---|
| 47 | # -Xprof Function call profiling
|
---|
| 48 | # -Xloggc:<file> Write garbage collection log
|
---|
| 49 |
|
---|
| 50 | # $javapath -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/mail.jar:lib/activation.jar org.greenstone.gatherer.GathererProg -gsdl $GSDLHOME -wget $wgetpath $*
|
---|
| 51 |
|
---|
| 52 | java -cp $CLASSPATH org.greenstone.admin.GAI $GSDL3SRCHOME $GSDL3HOME
|
---|