comparison scripts/build-luan.sh @ 308:869d2263de5d

move scripts git-svn-id: https://luan-java.googlecode.com/svn/trunk@309 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Tue, 23 Dec 2014 05:48:49 +0000
parents dist/scripts/build-luan.sh@4bf49f0a46b3
children 6bf47e28e0e5
comparison
equal deleted inserted replaced
307:4bf49f0a46b3 308:869d2263de5d
1 VERSION=`svnversion`
2
3 if echo $VERSION | grep :
4 then
5 echo "svn update needed"
6 exit 1
7 fi
8
9
10 LUAN_BUILD=~/luanbuild
11
12 . check_luan_home.sh
13
14 set -e
15
16 rm -rf $LUAN_BUILD
17 mkdir $LUAN_BUILD
18 mkdir $LUAN_BUILD/luan
19 mkdir $LUAN_BUILD/luan/jars
20
21 cd $LUAN_HOME
22 echo "_G._VERSION = 'Luan $VERSION'" >core/src/luan/version.luan
23
24 cd $LUAN_HOME
25 SRC=core/src
26 CLASSPATH=$LUAN_HOME/$SRC
27 javac -classpath $CLASSPATH `find $SRC -name *.java`
28 cd $SRC
29 jar cvf $LUAN_BUILD/luan/jars/luan-core-$VERSION.jar `find . -name *.class -o -name *.luan`
30
31 cd $LUAN_HOME
32 SRC=web/src
33 CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC
34 for i in $LUAN_HOME/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done
35 javac -classpath $CLASSPATH `find $SRC -name *.java`
36 cd $SRC
37 jar cvf $LUAN_BUILD/luan/jars/luan-web-$VERSION.jar `find . -name *.class -o -name *.luan`
38
39 cd $LUAN_HOME
40 SRC=logging/src
41 CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC
42 for i in $LUAN_HOME/logging/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done
43 javac -classpath $CLASSPATH `find $SRC -name *.java`
44 cd $SRC
45 jar cvf $LUAN_BUILD/luan/jars/luan-logging-$VERSION.jar `find . -name *.class -o -name *.luan`
46
47 cd $LUAN_HOME
48 SRC=mail/src
49 CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC
50 for i in $LUAN_HOME/mail/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done
51 javac -classpath $CLASSPATH `find $SRC -name *.java`
52 cd $SRC
53 jar cvf $LUAN_BUILD/luan/jars/luan-mail-$VERSION.jar `find . -name *.class -o -name *.luan`
54
55 cd $LUAN_HOME
56 SRC=lucene/src
57 CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC
58 for i in $LUAN_HOME/lucene/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done
59 javac -classpath $CLASSPATH `find $SRC -name *.java`
60 cd $SRC
61 jar cvf $LUAN_BUILD/luan/jars/luan-lucene-$VERSION.jar `find . -name *.class -o -name *.luan`
62
63 cp $LUAN_HOME/web/ext/* $LUAN_BUILD/luan/jars
64 cp $LUAN_HOME/logging/ext/* $LUAN_BUILD/luan/jars
65 cp $LUAN_HOME/mail/ext/* $LUAN_BUILD/luan/jars
66 cp $LUAN_HOME/lucene/ext/* $LUAN_BUILD/luan/jars
67
68 cp $LUAN_HOME/dist/scripts/install.sh $LUAN_BUILD/luan
69 chmod +x $LUAN_BUILD/luan/install.sh
70 cp $LUAN_HOME/dist/scripts/uninstall.sh $LUAN_BUILD/luan
71
72 cd $LUAN_BUILD
73 tar -cf luan-$VERSION.tar luan