Mercurial Hosting > luan
annotate scripts/build-luan.sh @ 776:815c119dac7a
remove docs
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 26 Aug 2016 14:39:18 -0600 |
parents | 1a68fc55a80c |
children | fc3e366caa51 |
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 |
521
8a217fe5b4f3
cleaner LuanState.onClose()
Franklin Schmidt <fschmidt@gmail.com>
parents:
493
diff
changeset
|
6 SLF4J=$LUAN_HOME/logging/ext/slf4j-api-1.6.4.jar |
311
22ca4f3a65c3
remove LUAN_HOME
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
309
diff
changeset
|
7 |
342
93fa3dbe0c2f
rename version to version.sh and change to version 0.1
Franklin Schmidt <fschmidt@gmail.com>
parents:
329
diff
changeset
|
8 VERSION=`scripts/version.sh` |
307
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
9 |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
10 rm -rf $LUAN_BUILD |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
11 mkdir $LUAN_BUILD |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
12 mkdir $LUAN_BUILD/luan |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
13 mkdir $LUAN_BUILD/luan/jars |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
14 |
238
55b4b077e5cc
improve scripts
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
235
diff
changeset
|
15 cd $LUAN_HOME |
775
1a68fc55a80c
simplify dir structure
Franklin Schmidt <fschmidt@gmail.com>
parents:
774
diff
changeset
|
16 echo "return '$VERSION'" >src/luan/version.luan |
692
7bd97d642f37
delete class files in build
Franklin Schmidt <fschmidt@gmail.com>
parents:
521
diff
changeset
|
17 find . -name *.class -delete |
172
4edbf3204ca6
add build.sh and dist
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff
changeset
|
18 |
775
1a68fc55a80c
simplify dir structure
Franklin Schmidt <fschmidt@gmail.com>
parents:
774
diff
changeset
|
19 CLASSPATH=$LUAN_HOME/src |
1a68fc55a80c
simplify dir structure
Franklin Schmidt <fschmidt@gmail.com>
parents:
774
diff
changeset
|
20 for i in $LUAN_HOME/lib/* ; do CLASSPATH=$CLASSPATH:$i ; done |
1a68fc55a80c
simplify dir structure
Franklin Schmidt <fschmidt@gmail.com>
parents:
774
diff
changeset
|
21 cd src |
1a68fc55a80c
simplify dir structure
Franklin Schmidt <fschmidt@gmail.com>
parents:
774
diff
changeset
|
22 javac -classpath $CLASSPATH `find . -name *.java` |
729
4ce68aad92b7
just build one luan jar file
Franklin Schmidt <fschmidt@gmail.com>
parents:
728
diff
changeset
|
23 jar cvf $LUAN_BUILD/luan/jars/luan-$VERSION.jar `find . -name *.class -o -name *.luan` |
775
1a68fc55a80c
simplify dir structure
Franklin Schmidt <fschmidt@gmail.com>
parents:
774
diff
changeset
|
24 cp $LUAN_HOME/lib/* $LUAN_BUILD/luan/jars |
307
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
25 |
309
6bf47e28e0e5
fix build
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
308
diff
changeset
|
26 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
|
27 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
|
28 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
|
29 |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
30 cd $LUAN_BUILD |
4bf49f0a46b3
improve build process
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
286
diff
changeset
|
31 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
|
32 |
317
c730ff1e4bae
minor
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
311
diff
changeset
|
33 luan/install.sh |
c730ff1e4bae
minor
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
311
diff
changeset
|
34 |
309
6bf47e28e0e5
fix build
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
308
diff
changeset
|
35 echo done |