Mercurial Hosting > luan
annotate scripts/build-luan.sh @ 316:d6cce1cc8948
Add another query example to search tool.
git-svn-id: https://luan-java.googlecode.com/svn/trunk@317 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | hugo.tech@gmail.com <hugo.tech@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Mon, 29 Dec 2014 19:12:53 +0000 |
parents | 22ca4f3a65c3 |
children | c730ff1e4bae |
rev | line source |
---|---|
311
22ca4f3a65c3
remove LUAN_HOME
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
309
diff
changeset
|
1 set -e |
309
6bf47e28e0e5
fix build
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
308
diff
changeset
|
2 |
311
22ca4f3a65c3
remove LUAN_HOME
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
309
diff
changeset
|
3 cd `dirname $0`/.. |
22ca4f3a65c3
remove LUAN_HOME
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
309
diff
changeset
|
4 LUAN_HOME=`pwd` |
22ca4f3a65c3
remove LUAN_HOME
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
309
diff
changeset
|
5 LUAN_BUILD=$LUAN_HOME/build |
22ca4f3a65c3
remove LUAN_HOME
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
309
diff
changeset
|
6 |
307
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
7 VERSION=`svnversion` |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
8 |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
9 if echo $VERSION | grep : |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
10 then |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
11 echo "svn update needed" |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
12 exit 1 |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
13 fi |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
14 |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
15 rm -rf $LUAN_BUILD |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
16 mkdir $LUAN_BUILD |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
17 mkdir $LUAN_BUILD/luan |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
18 mkdir $LUAN_BUILD/luan/jars |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
19 |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
20 cd $LUAN_HOME |
173
58c6ca5d4524
fix build.sh
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
172
diff
changeset
|
21 echo "_G._VERSION = 'Luan $VERSION'" >core/src/luan/version.luan |
172
4edbf3204ca6
add build.sh and dist
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff
changeset
|
22 |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
23 cd $LUAN_HOME |
173
58c6ca5d4524
fix build.sh
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
172
diff
changeset
|
24 SRC=core/src |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
25 CLASSPATH=$LUAN_HOME/$SRC |
173
58c6ca5d4524
fix build.sh
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
172
diff
changeset
|
26 javac -classpath $CLASSPATH `find $SRC -name *.java` |
58c6ca5d4524
fix build.sh
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
172
diff
changeset
|
27 cd $SRC |
307
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
28 jar cvf $LUAN_BUILD/luan/jars/luan-core-$VERSION.jar `find . -name *.class -o -name *.luan` |
173
58c6ca5d4524
fix build.sh
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
172
diff
changeset
|
29 |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
30 cd $LUAN_HOME |
173
58c6ca5d4524
fix build.sh
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
172
diff
changeset
|
31 SRC=web/src |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
32 CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC |
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
33 for i in $LUAN_HOME/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done |
173
58c6ca5d4524
fix build.sh
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
172
diff
changeset
|
34 javac -classpath $CLASSPATH `find $SRC -name *.java` |
58c6ca5d4524
fix build.sh
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
172
diff
changeset
|
35 cd $SRC |
307
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
36 jar cvf $LUAN_BUILD/luan/jars/luan-web-$VERSION.jar `find . -name *.class -o -name *.luan` |
205
3918f92de5fe
add logging component
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
173
diff
changeset
|
37 |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
38 cd $LUAN_HOME |
205
3918f92de5fe
add logging component
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
173
diff
changeset
|
39 SRC=logging/src |
286
91be4027b2a8
Improve HTML of some tools.
hugo.tech@gmail.com <hugo.tech@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
238
diff
changeset
|
40 CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC |
91be4027b2a8
Improve HTML of some tools.
hugo.tech@gmail.com <hugo.tech@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
238
diff
changeset
|
41 for i in $LUAN_HOME/logging/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done |
91be4027b2a8
Improve HTML of some tools.
hugo.tech@gmail.com <hugo.tech@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
238
diff
changeset
|
42 javac -classpath $CLASSPATH `find $SRC -name *.java` |
205
3918f92de5fe
add logging component
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
173
diff
changeset
|
43 cd $SRC |
307
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
44 jar cvf $LUAN_BUILD/luan/jars/luan-logging-$VERSION.jar `find . -name *.class -o -name *.luan` |
229
2a54cb7d1cf4
improve security
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
205
diff
changeset
|
45 |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
46 cd $LUAN_HOME |
229
2a54cb7d1cf4
improve security
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
205
diff
changeset
|
47 SRC=mail/src |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
48 CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC |
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
49 for i in $LUAN_HOME/mail/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done |
229
2a54cb7d1cf4
improve security
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
205
diff
changeset
|
50 javac -classpath $CLASSPATH `find $SRC -name *.java` |
2a54cb7d1cf4
improve security
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
205
diff
changeset
|
51 cd $SRC |
307
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
52 jar cvf $LUAN_BUILD/luan/jars/luan-mail-$VERSION.jar `find . -name *.class -o -name *.luan` |
234
b25feac318d8
add lucene jar and minor changes
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
229
diff
changeset
|
53 |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
54 cd $LUAN_HOME |
234
b25feac318d8
add lucene jar and minor changes
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
229
diff
changeset
|
55 SRC=lucene/src |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
56 CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC |
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
57 for i in $LUAN_HOME/lucene/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done |
234
b25feac318d8
add lucene jar and minor changes
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
229
diff
changeset
|
58 javac -classpath $CLASSPATH `find $SRC -name *.java` |
b25feac318d8
add lucene jar and minor changes
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
229
diff
changeset
|
59 cd $SRC |
307
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
60 jar cvf $LUAN_BUILD/luan/jars/luan-lucene-$VERSION.jar `find . -name *.class -o -name *.luan` |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
61 |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
62 cp $LUAN_HOME/web/ext/* $LUAN_BUILD/luan/jars |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
63 cp $LUAN_HOME/logging/ext/* $LUAN_BUILD/luan/jars |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
64 cp $LUAN_HOME/mail/ext/* $LUAN_BUILD/luan/jars |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
65 cp $LUAN_HOME/lucene/ext/* $LUAN_BUILD/luan/jars |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
66 |
309
6bf47e28e0e5
fix build
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
308
diff
changeset
|
67 cp $LUAN_HOME/scripts/install.sh $LUAN_BUILD/luan |
307
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
68 chmod +x $LUAN_BUILD/luan/install.sh |
309
6bf47e28e0e5
fix build
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
308
diff
changeset
|
69 cp $LUAN_HOME/scripts/uninstall.sh $LUAN_BUILD/luan |
307
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
70 |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
71 cd $LUAN_BUILD |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
72 tar -cf luan-$VERSION.tar luan |
309
6bf47e28e0e5
fix build
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
308
diff
changeset
|
73 |
6bf47e28e0e5
fix build
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
308
diff
changeset
|
74 echo done |