[8272] | 1 | #!/bin/sh
|
---|
[16546] | 2 |
|
---|
| 3 | # Function that, when given gsdlpath as parameter, will return the
|
---|
| 4 | # version of greenstone that is to run (2 or 3). If things are not,
|
---|
| 5 | # this program will exit here.
|
---|
| 6 | get_version() {
|
---|
| 7 | # first parameter is value of gsdlpath
|
---|
| 8 | if [ -f "${1}/gs3-setup.sh" ]; then
|
---|
| 9 | return 3
|
---|
| 10 | elif [ -f "${1}/setup.bash" ]; then
|
---|
| 11 | return 2
|
---|
| 12 | else
|
---|
| 13 | echo "Error: can't determine which Greenstone version is being run."
|
---|
| 14 | exit 1
|
---|
| 15 | fi
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | # Function that is passed the following paramters (in order):
|
---|
| 19 | # - the gsdlpath (GS3 home, GS2 home or gs2build for GS3),
|
---|
| 20 | # - the version of greenstone that's running, and
|
---|
| 21 | # - the language GLI is set to
|
---|
| 22 | # and checks the installation.
|
---|
| 23 | # If things are not right, this program will exit here.
|
---|
| 24 | check_installation() {
|
---|
| 25 | # Check that the Greenstone installation looks OK
|
---|
| 26 | if [ "$3" = "es" ]; then
|
---|
| 27 | echo "Revisando GSDL$2: $1"
|
---|
| 28 | elif [ "$3" = "fr" ]; then
|
---|
| 29 | echo "Vérification de GSDL$2: $1"
|
---|
| 30 | elif [ "$3" = "ru" ]; then
|
---|
| 31 | echo "ðÒÏ×ÅÒËÁ GSDL$2: $1"
|
---|
| 32 | else
|
---|
| 33 | echo "Checking GSDL$2: $1"
|
---|
| 34 | fi
|
---|
| 35 | # even if we are only checking for gs2build (gsdl2path), we still
|
---|
| 36 | # need the file setup.bash to exist in the following condition:
|
---|
| 37 | if [ ! -f "${1}/gs3-setup.sh" -a ! -f "${1}/setup.bash" ] ; then
|
---|
| 38 | echo
|
---|
| 39 | if [ "$3" = "es" ]; then
|
---|
| 40 | echo "No se pudo encontrar la instalación de Greenstone $2 o está incompleta."
|
---|
| 41 | echo "Trate de reinstalar Greenstone $2 y a continuación ejecute nuevamente"
|
---|
| 42 | echo "este guión."
|
---|
| 43 | elif [ "$3" = "fr" ]; then
|
---|
| 44 | echo "L'installation de Greenstone $2 est introuvable ou incomplète."
|
---|
| 45 | echo "Essayez de réinstaller Greenstone $2 et exécutez ce script à nouveau."
|
---|
| 46 | elif [ "$3" = "ru" ]; then
|
---|
| 47 | echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone $_version ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ."
|
---|
| 48 | echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone $2, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á."
|
---|
| 49 | else
|
---|
| 50 | echo "The Greenstone $2 installation could not be found, or is incomplete."
|
---|
| 51 | echo "Try reinstalling Greenstone $2 then running this script again."
|
---|
| 52 | fi
|
---|
| 53 | exit 1
|
---|
| 54 | fi
|
---|
| 55 | }
|
---|
| 56 |
|
---|
[8272] | 57 | glilang=en
|
---|
| 58 |
|
---|
[16546] | 59 | if [ "$glilang" = "es" ]; then
|
---|
| 60 | PROGNAME="Editar conjuntos de metadatos"
|
---|
| 61 | elif [ "$glilang" = "fr" ]; then
|
---|
| 62 | PROGNAME="Editer les jeux de méta-données"
|
---|
| 63 | elif [ "$glilang" = "ru" ]; then
|
---|
| 64 | PROGNAME="òÅÄÁËÔÉÒÏ×ÁÔØ ÎÁÂÏÒÙ ÍÅÔÁÄÁÎÎÙÈ"
|
---|
| 65 | else
|
---|
| 66 | PROGNAME="Greenstone Editor for Metadata Sets"
|
---|
| 67 | fi
|
---|
| 68 |
|
---|
| 69 | PROGABBR="GEMS"
|
---|
| 70 |
|
---|
| 71 | PROGNAME_EN="Greenstone Editor for Metadata Sets"
|
---|
| 72 |
|
---|
| 73 |
|
---|
[8272] | 74 | echo
|
---|
[12287] | 75 | if [ "$glilang" = "es" ]; then
|
---|
[16546] | 76 | echo "$PROGNAME ($PROGNAME_EN - $PROGABBR)"
|
---|
[12453] | 77 | echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato"
|
---|
[10788] | 78 | echo "GEMS NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA."
|
---|
[8272] | 79 | echo "Para mayor información vea los términos de la licencia en LICENSE.txt"
|
---|
| 80 | echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita"
|
---|
[12287] | 81 | elif [ "$glilang" = "fr" ]; then
|
---|
[16546] | 82 | echo "$PROGNAME ($PROGNAME_EN - $PROGABBR)"
|
---|
[12453] | 83 | echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato"
|
---|
[10788] | 84 | echo "GEMS est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt"
|
---|
[8272] | 85 | echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer"
|
---|
[12287] | 86 | elif [ "$glilang" = "ru" ]; then
|
---|
[16546] | 87 | echo "$PROGNAME ($PROGNAME_EN - $PROGABBR)"
|
---|
[12453] | 88 | echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato"
|
---|
[8272] | 89 | echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT"
|
---|
| 90 | echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ"
|
---|
| 91 | else
|
---|
[16546] | 92 | echo "$PROGNAME ($PROGABBR)"
|
---|
[12453] | 93 | echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato"
|
---|
[10788] | 94 | echo "GEMS comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt"
|
---|
[8272] | 95 | echo "This is free software, and you are welcome to redistribute it"
|
---|
| 96 | fi
|
---|
| 97 | echo
|
---|
| 98 |
|
---|
[10788] | 99 | ## -------- Run the Greenstone Editor for Metadata Sets --------
|
---|
[8272] | 100 |
|
---|
| 101 | # This script must be run from within the directory in which it lives
|
---|
| 102 | thisdir=`pwd`
|
---|
[10788] | 103 | if [ ! -f "${thisdir}/gems.sh" ]; then
|
---|
[12287] | 104 | if [ "$glilang" = "es" ]; then
|
---|
[8272] | 105 | echo "Este guión deberá ejecutarse desde el directorio en el que reside."
|
---|
[12287] | 106 | elif [ "$glilang" = "fr" ]; then
|
---|
[8272] | 107 | echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
|
---|
[12287] | 108 | elif [ "$glilang" = "ru" ]; then
|
---|
[8272] | 109 | echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
|
---|
| 110 | else
|
---|
| 111 | echo "This script must be run from the directory in which it resides."
|
---|
| 112 | fi
|
---|
| 113 | exit 1
|
---|
| 114 | fi
|
---|
| 115 |
|
---|
| 116 |
|
---|
| 117 | ## ---- Determine GSDLHOME ----
|
---|
[16546] | 118 | ## gsdlpath can be either Greenstone 3 or Greenstone 2
|
---|
[8272] | 119 | gsdlpath=
|
---|
[16546] | 120 | # Some users may set the above line manually
|
---|
[8272] | 121 |
|
---|
[16546] | 122 |
|
---|
| 123 | # This variable is set automatically:
|
---|
| 124 | _version=
|
---|
| 125 | if [ "x$gsdlpath" != "x" ]; then
|
---|
| 126 | get_version $gsdlpath
|
---|
| 127 | _version=$?
|
---|
| 128 | # otherwise $gsdlpath is not yet set
|
---|
| 129 | else
|
---|
[8272] | 130 | # Check the environment variable first
|
---|
[16546] | 131 | # Check whether environment variables for both GS2 and GS3 are set
|
---|
| 132 | # and if so, warn the user that we have defaulted to GS3
|
---|
| 133 | if [ "x$GSDLHOME" != "x" -a "x$GSDL3SRCHOME" != "x" ]; then
|
---|
| 134 | # _version not set, but both env vars set, so default to 3
|
---|
| 135 | _version=3
|
---|
| 136 | gsdlpath=$GSDL3SRCHOME
|
---|
| 137 | echo "Both Greenstone 2 and Greenstone 3 environments are set."
|
---|
| 138 | echo "It is assumed you want to run Greenstone 3."
|
---|
| 139 | echo "If you want to run Greenstone 2, please unset the"
|
---|
| 140 | echo "environment variable GSDL3SRCHOME before running GLI."
|
---|
| 141 | echo ""
|
---|
| 142 | elif [ "x$GSDL3SRCHOME" != "x" ]; then
|
---|
| 143 | echo "Only gsdl3srchome set"
|
---|
| 144 | gsdlpath=$GSDL3SRCHOME
|
---|
| 145 | _version=3
|
---|
| 146 | echo "$gsdlpath"
|
---|
| 147 | elif [ "x$GSDLHOME" != "x" ]; then
|
---|
[8272] | 148 | gsdlpath=$GSDLHOME
|
---|
[16546] | 149 | _version=2
|
---|
| 150 | # If it is not set, assume that the GLI is installed as a subdirectory of Greenstone
|
---|
[8272] | 151 | else
|
---|
[12287] | 152 | gsdlpath=`(cd .. && pwd)`
|
---|
[16546] | 153 | # Still need to find what version we are running:
|
---|
| 154 | # GS3 main directory contains file gs3-setup.sh, GS2 only setup.bash
|
---|
| 155 | get_version $gsdlpath
|
---|
| 156 | _version=$?
|
---|
[8272] | 157 | fi
|
---|
| 158 | fi
|
---|
| 159 |
|
---|
[16546] | 160 | echo "Greenstone version found: $_version"
|
---|
| 161 |
|
---|
| 162 | # Check that the main Greenstone installation for the version we're running looks OK
|
---|
| 163 | check_installation $gsdlpath $_version $glilang
|
---|
| 164 |
|
---|
| 165 |
|
---|
| 166 | # Need to source the correct setup file depending on whether we are running
|
---|
| 167 | # gs3 or gs2
|
---|
| 168 | # If we're running version GS2
|
---|
| 169 | if [ "$_version" -eq 2 ]; then
|
---|
| 170 | # Setup Greenstone 2, unless it has already been done
|
---|
| 171 | if [ "x$GSDLHOME" = "x" ]; then
|
---|
| 172 | cd "$gsdlpath"
|
---|
| 173 | . setup.bash
|
---|
| 174 | cd "$thisdir"
|
---|
[8272] | 175 | fi
|
---|
[16546] | 176 | # else, if we're running GS3
|
---|
| 177 | elif [ "$_version" -eq 3 ]; then
|
---|
| 178 | # Setup Greenstone 3, unless it has already been done
|
---|
| 179 | if [ "x$GSDL3HOME" = "x" -o "x$GSDL3SRCHOME" = "x" ]; then
|
---|
| 180 | cd "$gsdlpath"
|
---|
| 181 | . gs3-setup.sh
|
---|
| 182 | cd "$thisdir"
|
---|
| 183 | fi
|
---|
| 184 |
|
---|
| 185 | ## if Greenstone version 3 is running, we want to set gsdl2path
|
---|
| 186 | ## ---- Determine GSDLHOME ----
|
---|
| 187 | ## may be already set, or manually entered here.
|
---|
| 188 | gsdl2path=
|
---|
| 189 |
|
---|
| 190 | # Some users may set the above line manually
|
---|
| 191 | if [ "x$gsdl2path" = "x" ]; then
|
---|
| 192 | # Check the environment variable first
|
---|
| 193 | if [ "x$GSDLHOME" != "x" ]; then
|
---|
| 194 | echo "GSDLHOME environment variable is set to $GSDLHOME."
|
---|
| 195 | echo "Will use this to find build scripts."
|
---|
| 196 | gsdl2path=$GSDLHOME
|
---|
| 197 | # If it is not set, assume that the gs2build subdirectory of Greenstone 3 exists
|
---|
| 198 | else
|
---|
| 199 | gsdl2path=$GSDL3SRCHOME/gs2build
|
---|
| 200 | fi
|
---|
| 201 | fi
|
---|
| 202 | # Check that Greenstone 3's Greenstone 2 stuff looks OK (in gs2build)
|
---|
| 203 | check_installation $gsdl2path "" $glilang
|
---|
| 204 |
|
---|
| 205 | # Setup Greenstone 3's gs2build, unless it has already been done
|
---|
| 206 | if [ "x$GSDLHOME" = "x" ]; then
|
---|
| 207 | cd "$gsdl2path"
|
---|
| 208 | . setup.bash
|
---|
| 209 | cd "$thisdir"
|
---|
| 210 | fi
|
---|
| 211 |
|
---|
| 212 | else
|
---|
| 213 | echo "Greenstone version unknown."
|
---|
[8272] | 214 | exit 1
|
---|
| 215 | fi
|
---|
| 216 |
|
---|
[16546] | 217 | echo
|
---|
| 218 | if [ "x$GSDL3SRCHOME" != "x" ]; then
|
---|
| 219 | echo "GSDL3SRCHOME is: $GSDL3SRCHOME"
|
---|
[8272] | 220 | fi
|
---|
[16546] | 221 | if [ "x$GSDL3HOME" != "x" ]; then
|
---|
| 222 | echo "GSDL3HOME is: $GSDL3HOME"
|
---|
| 223 | fi
|
---|
| 224 | if [ "x$GSDLHOME" != "x" ]; then
|
---|
| 225 | echo "GSDLHOME is: $GSDLHOME"
|
---|
| 226 | fi
|
---|
| 227 | echo
|
---|
[8272] | 228 |
|
---|
| 229 |
|
---|
[16546] | 230 |
|
---|
[8272] | 231 | ## ---- Check Java exists ----
|
---|
| 232 | javapath=
|
---|
| 233 |
|
---|
| 234 | # Some users may set the above line manually
|
---|
[12287] | 235 | if [ "x$javapath" = "x" ]; then
|
---|
[8272] | 236 |
|
---|
| 237 | # If it is set, use the JAVA_HOME environment variable
|
---|
[12287] | 238 | if [ "x$JAVA_HOME" != "x" ]; then
|
---|
[8272] | 239 | javapath="$JAVA_HOME/bin/java"
|
---|
| 240 |
|
---|
| 241 | # Check if Java is on the search path
|
---|
| 242 | else
|
---|
| 243 | javapath=`which java 2> /dev/null`
|
---|
| 244 | fi
|
---|
| 245 | fi
|
---|
| 246 |
|
---|
| 247 | # Check that a Java executable has been found
|
---|
[12287] | 248 | if [ "$glilang" = "es" ]; then
|
---|
[8272] | 249 | echo "Revisando Java: $javapath"
|
---|
[12287] | 250 | elif [ "$glilang" = "fr" ]; then
|
---|
[8272] | 251 | echo "Vérification de Java: $javapath"
|
---|
[12287] | 252 | elif [ "$glilang" = "ru" ]; then
|
---|
[8272] | 253 | echo "ðÒÏ×ÅÒËÁ Java: $javapath"
|
---|
| 254 | else
|
---|
| 255 | echo "Checking Java: $javapath"
|
---|
| 256 | fi
|
---|
| 257 | if [ ! -x "$javapath" ]; then
|
---|
| 258 | echo
|
---|
[12287] | 259 | if [ "$glilang" = "es" ]; then
|
---|
[8272] | 260 | echo "No se pudo localizar una versión apropiada de Java. Usted deberá "
|
---|
| 261 | echo "instalar un Ambiente de Ejecución Java (versión 1.4 o superior) "
|
---|
[16546] | 262 | echo "antes de correr la $PROGNAME."
|
---|
[12287] | 263 | elif [ "$glilang" = "fr" ]; then
|
---|
[8272] | 264 | echo "Une version adéquate de Java n'a pas pu être localisée."
|
---|
| 265 | echo "Vous devez installer un Java Runtime Environment (version 1.4 ou"
|
---|
[16546] | 266 | echo "supérieur) avant de démarrer $PROGNAME."
|
---|
[12287] | 267 | elif [ "$glilang" = "ru" ]; then
|
---|
[8272] | 268 | echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java."
|
---|
| 269 | echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)"
|
---|
[16546] | 270 | echo "ÐÅÒÅÄ ××ÏÄÏÍ $PROGNAME."
|
---|
[8272] | 271 | else
|
---|
| 272 | echo "Failed to locate an appropriate version of Java. You must install a"
|
---|
| 273 | echo "Java Runtime Environment (version 1.4 or greater) before running the"
|
---|
[16546] | 274 | echo "$PROGNAME."
|
---|
[8272] | 275 | fi
|
---|
| 276 | exit 1
|
---|
| 277 | fi
|
---|
| 278 |
|
---|
| 279 |
|
---|
[16546] | 280 | ## -- Check the version of Java is new enough (1.4.0 or higher) to run the GLI --
|
---|
[10788] | 281 | `$javapath -classpath . CheckJavaVersion > /dev/null`
|
---|
| 282 | if [ $? -ne 2 ] ; then
|
---|
[8272] | 283 | echo
|
---|
[12287] | 284 | if [ "$glilang" = "es" ]; then
|
---|
[8272] | 285 | echo "La versión del Ambiente de Ejecución Java (JRE por sus siglas en "
|
---|
| 286 | echo "inglés) que usted tiene instalada es demasiado vieja para ejecutar "
|
---|
[16546] | 287 | echo "la $PROGNAME. Por favor instale una "
|
---|
| 288 | echo "nueva versión del Ambiente de Ejecución Java (versión 1.4 o "
|
---|
| 289 | echo "posterior) y ejecute nuevamente este guión."
|
---|
[12287] | 290 | elif [ "$glilang" = "fr" ]; then
|
---|
[8272] | 291 | echo "La version de Java Runtime Environment que vous avez installée est"
|
---|
[16546] | 292 | echo "trop vielle pour faire fonctionner $PROGNAME."
|
---|
[8272] | 293 | echo "Veuillez installer une nouvelle version du JRE (version 1.4 ou plus"
|
---|
| 294 | echo "récente) et redémarrez le script."
|
---|
[12287] | 295 | elif [ "$glilang" = "ru" ]; then
|
---|
[8272] | 296 | echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ,"
|
---|
[16546] | 297 | echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ $PROGNAME. ðÏÖÁÌÕÊÓÔÁ, "
|
---|
[8272] | 298 | echo "ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ JRE (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ ÎÏ×ÕÀ) É"
|
---|
| 299 | echo "ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ"
|
---|
| 300 | else
|
---|
| 301 | echo "The version of the Java Runtime Environment you have installed is too"
|
---|
[16546] | 302 | echo "old to run the $PROGNAME. Please install a new"
|
---|
[8272] | 303 | echo "version of the JRE (version 1.4 or newer) and rerun this script."
|
---|
| 304 | fi
|
---|
| 305 | exit 1
|
---|
| 306 | fi
|
---|
| 307 |
|
---|
[10788] | 308 | ## ---- Check that the GEMS has been compiled ----
|
---|
[8272] | 309 | if [ ! -f "classes/org/greenstone/gatherer/gems/GEMS.class" ] && [ ! -f "GLI.jar" ]; then
|
---|
[10788] | 310 | echo
|
---|
[12287] | 311 | if [ "$glilang" = "es" ]; then
|
---|
[16546] | 312 | echo "Usted necesita compilar la $PROGNAME"
|
---|
[8272] | 313 | echo "(por medio de makegli.sh) antes de ejecutar este guión."
|
---|
[12287] | 314 | elif [ "$glilang" = "fr" ]; then
|
---|
[16546] | 315 | echo "Vous devez compiler le $PROGNAME (en utilisant makegli.sh)"
|
---|
[8272] | 316 | echo "avant d'exécuter ce script."
|
---|
[12287] | 317 | elif [ "$glilang" = "ru" ]; then
|
---|
[16546] | 318 | echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ $PROGNAME"
|
---|
[8272] | 319 | echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
|
---|
| 320 | else
|
---|
[16546] | 321 | echo "You need to compile the $PROGNAME (using makegli.sh)"
|
---|
[8272] | 322 | echo "before running this script."
|
---|
| 323 | fi
|
---|
| 324 | exit 1
|
---|
| 325 | fi
|
---|
| 326 |
|
---|
[10788] | 327 | ## ---- Finally, run the GEMS ----
|
---|
[8272] | 328 | echo
|
---|
[12287] | 329 | if [ "$glilang" = "es" ]; then
|
---|
[16546] | 330 | echo "Ejecutando la $PROGNAME..."
|
---|
[12287] | 331 | elif [ "$glilang" = "fr" ]; then
|
---|
[16546] | 332 | echo "Exécution de $PROGNAME..."
|
---|
[12287] | 333 | elif [ "$glilang" = "ru" ]; then
|
---|
[16546] | 334 | echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME..."
|
---|
[10788] | 335 | else
|
---|
[16546] | 336 | echo "Running the $PROGNAME..."
|
---|
[10788] | 337 | fi
|
---|
[8272] | 338 |
|
---|
[10788] | 339 | # Other arguments you can provide to GEMS to work around memory limitations, or debug
|
---|
[8272] | 340 | # -Xms<number>M To set minimum memory (by default 32MB)
|
---|
| 341 | # -Xmx<number>M To set maximum memory (by default the nearest 2^n to the total remaining physical memory)
|
---|
| 342 | # -verbose:gc To set garbage collection messages
|
---|
| 343 | # -Xincgc For incremental garbage collection (significantly slows performance)
|
---|
| 344 | # -Xprof Function call profiling
|
---|
| 345 | # -Xloggc:<file> Write garbage collection log
|
---|
| 346 |
|
---|
[16546] | 347 | # basic_command is the cmd string common to both Greenstone 3 and Greenstone 2 execution
|
---|
| 348 | # (gs3 doesn't -gsdl3src $GSDL3SRCHOME passed to it, it needs $GSDL3HOME to find the collect dir)
|
---|
| 349 | basic_command="$javapath -classpath classes/:GLI.jar:lib/apache.jar org.greenstone.gatherer.gems.GEMS"
|
---|
[8272] | 350 |
|
---|
[16546] | 351 | if [ "$_version" -eq 2 ]; then
|
---|
| 352 | `$basic_command -gsdl $GSDLHOME $*`
|
---|
| 353 | elif [ "$_version" -eq 3 ]; then
|
---|
| 354 | `$basic_command -gsdl3 $GSDL3HOME $*`
|
---|
| 355 | fi
|
---|
| 356 |
|
---|
| 357 |
|
---|
[12287] | 358 | if [ "$glilang" = "es" ]; then
|
---|
[8272] | 359 | echo "¡Hecho!"
|
---|
[12287] | 360 | elif [ "$glilang" = "fr" ]; then
|
---|
[8272] | 361 | echo "Terminé!"
|
---|
[12287] | 362 | elif [ "$glilang" = "ru" ]; then
|
---|
[8272] | 363 | echo "÷ÙÐÏÌÎÅÎÏ!"
|
---|
| 364 | else
|
---|
| 365 | echo "Done!"
|
---|
[16546] | 366 | fi |
---|