[8178] | 1 | #!/bin/sh
|
---|
| 2 | glilang=en
|
---|
[8172] | 3 |
|
---|
[8178] | 4 |
|
---|
| 5 | # This script must be run from within the directory in which it lives
|
---|
| 6 | thisdir=`pwd`
|
---|
| 7 | if [ ! -f "${thisdir}/makejar.sh" ]; then
|
---|
[12287] | 8 | if [ "$glilang" = "es" ]; then
|
---|
[8178] | 9 | echo "Este guión deberá ejecutarse desde el directorio en el que reside."
|
---|
[12287] | 10 | elif [ "$glilang" = "fr" ]; then
|
---|
[8178] | 11 | echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
|
---|
[12287] | 12 | elif [ "$glilang" = "ru" ]; then
|
---|
[8178] | 13 | echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
|
---|
| 14 | else
|
---|
| 15 | echo "This script must be run from the directory in which it resides."
|
---|
| 16 | fi
|
---|
| 17 | exit 1
|
---|
[8172] | 18 | fi
|
---|
| 19 |
|
---|
[15184] | 20 | echo "Generating the JAR files for Remote Greenstone"
|
---|
| 21 |
|
---|
[8178] | 22 | ## ---- Check that the GLI has been compiled ----
|
---|
| 23 | if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ]; then
|
---|
| 24 | echo
|
---|
[12287] | 25 | if [ "$glilang" = "es" ]; then
|
---|
[8178] | 26 | echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone"
|
---|
| 27 | echo "(por medio de makegli.sh) antes de ejecutar este guión."
|
---|
[12287] | 28 | elif [ "$glilang" = "fr" ]; then
|
---|
[8178] | 29 | echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)"
|
---|
| 30 | echo "avant d'exécuter ce script."
|
---|
[12287] | 31 | elif [ "$glilang" = "ru" ]; then
|
---|
[8178] | 32 | echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone"
|
---|
| 33 | echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
|
---|
| 34 | else
|
---|
| 35 | echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)"
|
---|
| 36 | echo "before running this script."
|
---|
| 37 | fi
|
---|
| 38 | exit 1
|
---|
| 39 | fi
|
---|
| 40 |
|
---|
[8181] | 41 | echo "Assuming that Java code is freshly compiled..."
|
---|
[8178] | 42 |
|
---|
[20594] | 43 | rm -rf jar
|
---|
| 44 | mkdir jar
|
---|
[8178] | 45 |
|
---|
[20594] | 46 | # GLI class files and supporting libraries
|
---|
[24783] | 47 | cd jar
|
---|
| 48 | jar xf ../lib/apache.jar com org
|
---|
| 49 | jar xf ../lib/qfslib.jar de
|
---|
[25683] | 50 | jar xf ../lib/rsyntaxtextarea.jar org theme.dtd
|
---|
[20594] | 51 | cd ..
|
---|
[8172] | 52 |
|
---|
[8178] | 53 | # Copy the latest version of the GLI classes into the jar directory
|
---|
| 54 | rm -rf jar/org/greenstone
|
---|
| 55 | cp -r classes/org/greenstone jar/org
|
---|
[8172] | 56 |
|
---|
[8179] | 57 | # Some of the things to go into the JAR file are optional, and may not exist
|
---|
| 58 | if [ -f collect.zip ]; then
|
---|
[20594] | 59 | cp collect.zip jar
|
---|
[8179] | 60 | fi
|
---|
[9094] | 61 |
|
---|
| 62 | # Recreate the metadata.zip file (contains the GLI metadata directory)
|
---|
| 63 | rm -f metadata.zip
|
---|
[20594] | 64 | zip -r jar/metadata.zip metadata >/dev/null
|
---|
[9094] | 65 |
|
---|
[20594] | 66 | # Dictionary files
|
---|
[18635] | 67 | cd classes
|
---|
[20594] | 68 | for dict_file in dictionary*.properties; do
|
---|
[20595] | 69 | cp $dict_file ../jar
|
---|
[18635] | 70 | done
|
---|
| 71 | cd ..
|
---|
| 72 |
|
---|
[20594] | 73 | # Other required directories and files
|
---|
| 74 | cp -r 'help' jar
|
---|
| 75 | cp -r 'classes/images' jar
|
---|
| 76 | cp -r 'classes/xml' jar
|
---|
| 77 | cp 'classes/feedback.properties' jar
|
---|
| 78 | cp '.java.policy' jar
|
---|
| 79 |
|
---|
| 80 | # Clean .svn dirs
|
---|
[20595] | 81 | find jar -name '.svn' -type d -exec rm -rf {} \; 2> /dev/null
|
---|
[20594] | 82 |
|
---|
[8178] | 83 | # Jar everything up
|
---|
[20594] | 84 | cd jar
|
---|
| 85 | jar cf ../GLI.jar *
|
---|
| 86 | cd ..
|
---|
[8172] | 87 |
|
---|
[13387] | 88 | # Generate the GLIServer.jar file for remote building
|
---|
[20594] | 89 | jar cf GLIServer.jar -C jar org/greenstone/gatherer/remote
|
---|
[8172] | 90 |
|
---|
[8178] | 91 | # ---- Make signed JAR file for the applet, if desired ----
|
---|
[12287] | 92 | if [ "$1" = "-sign" ]; then
|
---|
[8178] | 93 | rm -f SignedGatherer.jar
|
---|
| 94 | echo "greenstone" | jarsigner -keystore .greenstonestore -signedjar SignedGatherer.jar GLI.jar privateKey 2> /dev/null
|
---|
| 95 | echo
|
---|
| 96 | echo "Installing SignedGatherer in ../bin/java"
|
---|
| 97 | mv SignedGatherer.jar ../bin/java/.
|
---|
| 98 | fi
|
---|