1 | #!/bin/sh
|
---|
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 --------
|
---|
12 |
|
---|
13 | # This script must be run from within the directory in which it lives
|
---|
14 | thisdir=`pwd`
|
---|
15 | if [ ! -f "${thisdir}/gs3-admin.sh" ]; then
|
---|
16 | if [ "$gailang" == "es" ]; then
|
---|
17 | echo "Este guión deberá ejecutarse desde el directorio en el que reside."
|
---|
18 | elif [ "$gailang" == "fr" ]; then
|
---|
19 | echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
|
---|
20 | elif [ "$gailang" == "ru" ]; then
|
---|
21 | echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
|
---|
22 | else
|
---|
23 | echo "This script must be run from the directory in which it resides."
|
---|
24 | fi
|
---|
25 | exit 1
|
---|
26 | fi
|
---|
27 |
|
---|
28 |
|
---|
29 | ## ---- Determine GSDL3HOME ----
|
---|
30 | gsdl3path=
|
---|
31 |
|
---|
32 | # Some users may set the above line manually
|
---|
33 | if [ "$gsdl3path" == "" ]; then
|
---|
34 | # Check the environment variable first
|
---|
35 | if [ "$GSDL3SRCHOME" != "" ]; then
|
---|
36 | gsdl3path=$GSDL3SRCHOME
|
---|
37 |
|
---|
38 | # If it is not set, assume that the GAI is installed as a subdirectory of Greenstone
|
---|
39 | else
|
---|
40 | pushd .. > /dev/null
|
---|
41 | gsdl3path=`pwd`
|
---|
42 | popd > /dev/null
|
---|
43 | fi
|
---|
44 | fi
|
---|
45 |
|
---|
46 | # Setup Greenstone3, unless it has already been done
|
---|
47 | if [ "$GSDL3HOME" == "" ]; then
|
---|
48 | pushd $gsdl3path > /dev/null
|
---|
49 | source gs3-setup.sh
|
---|
50 | popd > /dev/null
|
---|
51 | fi
|
---|
52 |
|
---|
53 | # Other arguments you can provide to GLI to work around memory limitations, or debug
|
---|
54 | # -Xms<number>M To set minimum memory (by default 32MB)
|
---|
55 | # -Xmx<number>M To set maximum memory (by default the nearest 2^n to the total remaining physical memory)
|
---|
56 | # -verbose:gc To set garbage collection messages
|
---|
57 | # -Xincgc For incremental garbage collection (significantly slows performance)
|
---|
58 | # -Xprof Function call profiling
|
---|
59 | # -Xloggc:<file> Write garbage collection log
|
---|
60 |
|
---|
61 | # $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 $*
|
---|
62 |
|
---|
63 | java -cp $CLASSPATH org.greenstone.admin.GAI $GSDL3SRCHOME $GSDL3HOME
|
---|