1 | #!/bin/sh
|
---|
2 | glilang=
|
---|
3 |
|
---|
4 | echo
|
---|
5 | if [ "$glilang" == "fr" ]; then
|
---|
6 | echo "-- Still coming --"
|
---|
7 | elif [ "$glilang" == "ru" ]; then
|
---|
8 | echo "-- Still coming --"
|
---|
9 | else
|
---|
10 | echo 'Greenstone Librarian Interface (GLI)'
|
---|
11 | echo 'Copyright (C) 2004, New Zealand Digital Library Project, University Of Waikato'
|
---|
12 | echo 'GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt'
|
---|
13 | echo 'This is free software, and you are welcome to redistribute it'
|
---|
14 | fi
|
---|
15 | echo
|
---|
16 |
|
---|
17 | ## -------- Compile the Greenstone Librarian Interface --------
|
---|
18 |
|
---|
19 | ## ---- Check Javac exists ----
|
---|
20 | javacpath=
|
---|
21 |
|
---|
22 | # Some users may set the above line manually
|
---|
23 | if [ "$javacpath" == "" ]; then
|
---|
24 |
|
---|
25 | # If it is set, use the JAVA_HOME environment variable
|
---|
26 | if [ "$JAVA_HOME" != "" ]; then
|
---|
27 | javacpath="$JAVA_HOME/bin/javac"
|
---|
28 |
|
---|
29 | # Check if Javac is on the search path
|
---|
30 | else
|
---|
31 | javacpath=`which javac 2> /dev/null`
|
---|
32 | fi
|
---|
33 | fi
|
---|
34 |
|
---|
35 | # Check that a Javac executable has been found
|
---|
36 | if [ "$glilang" == "fr" ]; then
|
---|
37 | echo "Vérification de Javac: $javacpath"
|
---|
38 | elif [ "$glilang" == "ru" ]; then
|
---|
39 | echo "ðÒÏ×ÅÒËÁ Javac: $javacpath"
|
---|
40 | else
|
---|
41 | echo "Checking Javac: $javacpath"
|
---|
42 | fi
|
---|
43 | if [ ! -x "$javacpath" ]; then
|
---|
44 | echo
|
---|
45 | if [ "$glilang" == "fr" ]; then
|
---|
46 | echo "Une version appropriée de Javac n'a pas pu être localisée."
|
---|
47 | echo "Vous devez installer un Kit de Développement Java (version 1.4 ou"
|
---|
48 | echo "supérieure) avant de produire la documentation de Greenstone "
|
---|
49 | echo "Librarian Interface."
|
---|
50 | elif [ "$glilang" == "ru" ]; then
|
---|
51 | echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Javac."
|
---|
52 | echo "÷Ù ÄÏÌÖÎÙ ÉÎÓÔÁÌÌÉÒÏ×ÁÔØ Java Development Kit (×ÅÒÓÉÑ 1.4 ÉÌÉ ×ÙÛÅ)"
|
---|
53 | echo "ÐÒÅÖÄÅ, ÞÅÍ ÇÅÎÅÒÉÒÏ×ÁÔØ ÄÏËÕÍÅÎÔÁÃÉÀ ÄÌÑ ÂÉÂÌÉÏÔÅÞÎÏÇÏ "
|
---|
54 | echo "ÉÎÔÅÒÆÅÊÓÁ Greenstone."
|
---|
55 | else
|
---|
56 | echo "Failed to locate an appropriate version of Javac. You must install a"
|
---|
57 | echo "Java Development Kit (version 1.4 or greater) before compiling the"
|
---|
58 | echo "Greenstone Librarian Interface."
|
---|
59 | fi
|
---|
60 | exit 1
|
---|
61 | fi
|
---|
62 |
|
---|
63 | # Check that the version of javac is new enough (1.4.0 or higher) to compile the GLI
|
---|
64 | javacOK=`$javacpath -target 1.4 2>&1`
|
---|
65 | if [ ! "$javacOK" = "" ]; then
|
---|
66 | # Special code for javac 1.4.2, since it complains about "no source files"
|
---|
67 | javacOK142=`$javacpath -target 1.4 2>&1 | grep "javac: no source files"`
|
---|
68 | if [ "$javacOK142" = "" ]; then
|
---|
69 | echo
|
---|
70 | if [ "$glilang" == "fr" ]; then
|
---|
71 | echo "La version de Java Development Kit que vous avez installée est trop"
|
---|
72 | echo "vieille pour compiler Greenstone Librarian Interface. Veuillez "
|
---|
73 | echo "installer une nouvelle version de Java SDK (version 1.4 ou plus"
|
---|
74 | echo "récente) et redémarrez ce script."
|
---|
75 | elif [ "$glilang" == "ru" ]; then
|
---|
76 | echo "÷ÅÒÓÉÑ Java Development Kit, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÓÌÉÛËÏÍ ÓÔÁÒÁ,"
|
---|
77 | echo "ÞÔÏÂÙ ÄÁÔØ ×ÏÚÍÏÖÎÏÓÔØ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone."
|
---|
78 | echo "ðÏÖÁÌÕÊÓÔÁ, ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ Java SDK (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ"
|
---|
79 | echo "ÎÏ×ÕÀ) É ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ."
|
---|
80 | else
|
---|
81 | echo "The version of the Java Development Kit you have installed is too old"
|
---|
82 | echo "to compile the Greenstone Librarian Interface. Please install a new"
|
---|
83 | echo "version of the Java SDK (version 1.4 or newer) and rerun this script."
|
---|
84 | fi
|
---|
85 | exit 1
|
---|
86 | fi
|
---|
87 | fi
|
---|
88 |
|
---|
89 |
|
---|
90 | ## ---- Compile the GLI ----
|
---|
91 | echo
|
---|
92 |
|
---|
93 | # If a file has been specified at the command-line, just compile that file
|
---|
94 | if [ ! "x$*" = "x" ] ; then
|
---|
95 | if [ "$glilang" == "fr" ]; then
|
---|
96 | echo "Compilation de $* et des classes dépendantes,,,"
|
---|
97 | elif [ "$glilang" == "ru" ]; then
|
---|
98 | echo "ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ $* É ÚÁ×ÉÓÉÍÙÅ ËÌÁÓÓÙ..."
|
---|
99 | else
|
---|
100 | echo "Compiling $* and dependant classes..."
|
---|
101 | fi
|
---|
102 |
|
---|
103 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar $*
|
---|
104 |
|
---|
105 | if [ "$glilang" == "fr" ]; then
|
---|
106 | echo "Terminé!"
|
---|
107 | elif [ "$glilang" == "ru" ]; then
|
---|
108 | echo "÷ÙÐÏÌÎÅÎÏ!"
|
---|
109 | else
|
---|
110 | echo "Done!"
|
---|
111 | fi
|
---|
112 | exit 0
|
---|
113 | fi
|
---|
114 |
|
---|
115 | # Otherwise compile the lot...
|
---|
116 | if [ "$glilang" == "fr" ]; then
|
---|
117 | echo "Compilation de Greenstone Librarian Interface,,,"
|
---|
118 | elif [ "$glilang" == "ru" ]; then
|
---|
119 | echo "ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone..."
|
---|
120 | else
|
---|
121 | echo "Compiling the Greenstone Librarian Interface..."
|
---|
122 | fi
|
---|
123 |
|
---|
124 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/*.java
|
---|
125 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/cdm/*.java
|
---|
126 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/checklist/*.java
|
---|
127 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/collection/*.java
|
---|
128 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/file/*.java
|
---|
129 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/gui/*.java
|
---|
130 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/gui/border/*.java
|
---|
131 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/gui/metaaudit/*.java
|
---|
132 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/gui/tree/*.java
|
---|
133 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/help/*.java
|
---|
134 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/mem/*.java
|
---|
135 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/msm/*.java
|
---|
136 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/msm/parsers/*.java
|
---|
137 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/shell/*.java
|
---|
138 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/undo/*.java
|
---|
139 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/util/*.java
|
---|
140 | $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar:lib/nanoxml.jar src/org/greenstone/gatherer/valuetree/*.java
|
---|
141 |
|
---|
142 | if [ "$glilang" == "fr" ]; then
|
---|
143 | echo "Terminé!"
|
---|
144 | elif [ "$glilang" == "ru" ]; then
|
---|
145 | echo "÷ÙÐÏÌÎÅÎÏ!"
|
---|
146 | else
|
---|
147 | echo "Done!"
|
---|
148 | fi
|
---|