source: gli/trunk/makejar.sh@ 15981

Last change on this file since 15981 was 15184, checked in by kjdon, 16 years ago

added an extra output message. This should be translated

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1#!/bin/sh
2glilang=en
3
4
5# This script must be run from within the directory in which it lives
6thisdir=`pwd`
7if [ ! -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
18fi
19
20echo "Generating the JAR files for Remote Greenstone"
21
22## ---- Check that the GLI has been compiled ----
23if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ]; then
24 echo
25 if [ "$glilang" = "es" ]; then
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."
28 elif [ "$glilang" = "fr" ]; then
29 echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)"
30 echo "avant d'exécuter ce script."
31 elif [ "$glilang" = "ru" ]; then
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
39fi
40
41echo "Assuming that Java code is freshly compiled..."
42
43# All the GLI class files and supporting libraries are put into the "jar" directory
44if [ ! -d jar ]; then
45 mkdir jar
46
47 cd lib
48 jar xf apache.jar com org
49 jar xf qfslib.jar de
50
51 mv com de org ../jar/.
52 cd ..
53fi
54
55# Copy the latest version of the GLI classes into the jar directory
56rm -rf jar/org/greenstone
57cp -r classes/org/greenstone jar/org
58
59# Some of the things to go into the JAR file are optional, and may not exist
60optional=
61if [ -f collect.zip ]; then
62 optional="$optional collect.zip"
63fi
64
65# Recreate the metadata.zip file (contains the GLI metadata directory)
66rm -f metadata.zip
67zip -r metadata.zip metadata >/dev/null
68
69# Jar everything up
70jar cf GLI.jar .java.policy metadata.zip $optional help \
71 -C classes dictionary.properties -C classes dictionary_es.properties \
72 -C classes dictionary_fr.properties -C classes dictionary_ru.properties \
73 -C classes feedback.properties -C classes images -C classes xml \
74 -C jar com -C jar de -C jar org
75
76# Tidy up
77rm -f metadata.zip
78
79# Generate the GLIServer.jar file for remote building
80jar cf GLIServer.jar -C classes org/greenstone/gatherer/remote
81
82# ---- Make signed JAR file for the applet, if desired ----
83if [ "$1" = "-sign" ]; then
84 rm -f SignedGatherer.jar
85 echo "greenstone" | jarsigner -keystore .greenstonestore -signedjar SignedGatherer.jar GLI.jar privateKey 2> /dev/null
86 echo
87 echo "Installing SignedGatherer in ../bin/java"
88 mv SignedGatherer.jar ../bin/java/.
89fi
Note: See TracBrowser for help on using the repository browser.