- Timestamp:
- 2004-09-29T12:17:38+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/makejar.sh
r8173 r8178 1 #!/bin/bash 1 #!/bin/sh 2 glilang=en 2 3 3 if [ ! -d classes/org ] ; then 4 echo "Compiled version of Java code missing: classes/org does not exist" 5 exit 1; 6 else 7 echo "Assuming that Java code is freshly compiled ..." 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 8 if [ "$glilang" == "es" ]; then 9 echo "Este guión deberá ejecutarse desde el directorio en el que reside." 10 elif [ "$glilang" == "fr" ]; then 11 echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve." 12 elif [ "$glilang" == "ru" ]; then 13 echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ" 14 else 15 echo "This script must be run from the directory in which it resides." 16 fi 17 exit 1 8 18 fi 9 19 10 if [ ! -d libexpand ] ; then 11 mkdir libexpand 20 ## ---- Check that the GLI has been compiled ---- 21 if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ]; then 22 echo 23 if [ "$glilang" == "es" ]; then 24 echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone" 25 echo "(por medio de makegli.sh) antes de ejecutar este guión." 26 elif [ "$glilang" == "fr" ]; then 27 echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)" 28 echo "avant d'exécuter ce script." 29 elif [ "$glilang" == "ru" ]; then 30 echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone" 31 echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ" 32 else 33 echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)" 34 echo "before running this script." 35 fi 36 exit 1 37 fi 38 39 echo "Assuming that Java code is freshly compiled ..." 40 41 # All the GLI class files and supporting libraries are put into the "jar" directory 42 if [ ! -d jar ]; then 43 mkdir jar 44 12 45 cd lib 13 jar xvf activation.jar com javax 46 jar xvf activation.jar com javax 14 47 jar xvf apache.jar com org 15 jar xvf jp.jar jp 48 jar xvf jp.jar jp 16 49 jar xvf mail.jar com javax 17 50 jar xvf qfslib.jar de 18 51 19 /bin/mv com de javax jp org ../libexpand/.52 mv com de javax jp org ../jar/. 20 53 cd .. 21 54 fi 22 55 23 if [ ! -d orgmerge ] ; then 24 mkdir orgmerge 25 else 26 /bin/rm -rf orgmerge/org 56 # Copy the latest version of the GLI classes into the jar directory 57 rm -rf jar/org/greenstone 58 cp -r classes/org/greenstone jar/org 59 60 # Jar everything up 61 jar cf GLI.jar collect.zip \ 62 .java.policy plugins.dat classifiers.dat help \ 63 -C classes dictionary.properties -C classes dictionary_es.properties \ 64 -C classes dictionary_fr.properties -C classes dictionary_ru.properties \ 65 -C classes feedback.properties -C classes metadata.zip -C classes images \ 66 -C jar com -C jar de -C jar javax -C jar jp -C jar org 67 68 69 # ---- Make signed JAR file for the applet, if desired ---- 70 if [ "$1" == "-sign" ]; then 71 rm -f SignedGatherer.jar 72 echo "greenstone" | jarsigner -keystore .greenstonestore -signedjar SignedGatherer.jar GLI.jar privateKey 2> /dev/null 73 echo 74 echo "Installing SignedGatherer in ../bin/java" 75 mv SignedGatherer.jar ../bin/java/. 27 76 fi 28 29 # Can't have two different org directories in jared-up sequence30 # => merge them on the file system31 32 /bin/mv classes/org orgmerge/.33 /bin/cp -r libexpand/org orgmerge/.34 35 jar cvf GLI.jar .java.policy metadata.zip collect.zip \36 plugins.dat classifiers.dat help \37 -C classes . \38 -C libexpand com -C libexpand de -C libexpand javax -C libexpand jp \39 -C orgmerge org40
Note:
See TracChangeset
for help on using the changeset viewer.