root/main/trunk/greenstone3/admin/gs3-admin.sh @ 31655

Revision 22064, 1.8 KB (checked in by sjm84, 10 years ago)

Changed #!/bin/sh to #!/bin/bash

  • Property svn:executable set to *
Line 
1#!/bin/bash
2gailang=en
3
4echo
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"
9echo
10
11##  -------- Run the Greenstone Administrator Interface --------
12# Need to run this script from its own directory instead of whichever directory it may be called from
13
14thisdir="`dirname \"$0\"`"
15thisdir="`cd \"$thisdir\" && pwd`"
16cd "$thisdir"
17
18##  ---- Determine GSDL3HOME ----
19gsdl3path=
20
21# Some users may set the above line manually
22if [ "$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
29    pushd .. > /dev/null
30    gsdl3path=`pwd`
31    popd > /dev/null
32    fi
33fi
34
35# Setup Greenstone3, unless it has already been done
36if [ "$GSDL3HOME" == "" ]; then
37    pushd $gsdl3path > /dev/null
38    source gs3-setup.sh
39    popd > /dev/null
40fi
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
52java -cp $CLASSPATH org.greenstone.admin.GAI $GSDL3SRCHOME $GSDL3HOME
Note: See TracBrowser for help on using the browser.