comparison scripts/build-luan.sh @ 1123:f2eb8295033f

improve scripts
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 14 Aug 2017 17:39:08 -0600
parents 0d884377e923
children 040c98e1f837
comparison
equal deleted inserted replaced
1122:e15be31cee92 1123:f2eb8295033f
1 set -e 1 set -e
2 2
3 cd `dirname $0`/.. 3 cd `dirname $0`/..
4 LUAN_HOME=`pwd`
5 LUAN_BUILD=$LUAN_HOME/build
6 SLF4J=$LUAN_HOME/logging/ext/slf4j-api-1.6.4.jar
7 4
8 VERSION=`scripts/version.sh` 5 VERSION=`scripts/version.sh`
6 echo "return '$VERSION'" >src/luan/version.luan
9 7
10 rm -rf $LUAN_BUILD 8 rm -rf build
11 mkdir $LUAN_BUILD 9 mkdir -p build/luan/jars
12 mkdir $LUAN_BUILD/luan
13 mkdir $LUAN_BUILD/luan/jars
14 10
15 cd $LUAN_HOME
16 echo "return '$VERSION'" >src/luan/version.luan
17 find . -name *.class -delete 11 find . -name *.class -delete
18 12
19 CLASSPATH=$LUAN_HOME/src 13 . classpath.sh
20 for i in $LUAN_HOME/lib/* ; do CLASSPATH=$CLASSPATH:$i ; done 14 javac -classpath $CLASSPATH `find src -name *.java`
21 cd src 15 cd src; jar cvf ../build/luan/jars/luan-$VERSION.jar `find . -name *.class -o -name *.luan`; cd ..
22 javac -classpath $CLASSPATH `find . -name *.java` 16 cp lib/* build/luan/jars
23 jar cvf $LUAN_BUILD/luan/jars/luan-$VERSION.jar `find . -name *.class -o -name *.luan`
24 cp $LUAN_HOME/lib/* $LUAN_BUILD/luan/jars
25 17
26 cp $LUAN_HOME/scripts/install.sh $LUAN_BUILD/luan 18 cp scripts/install.sh build/luan
27 chmod +x $LUAN_BUILD/luan/install.sh 19 chmod +x build/luan/install.sh
28 cp $LUAN_HOME/scripts/uninstall.sh $LUAN_BUILD/luan 20 cp scripts/uninstall.sh build/luan
29 21
30 cd $LUAN_BUILD 22 cd build
31 tar -cf luan-$VERSION.tar luan 23 tar -cf luan-$VERSION.tar luan
32 24
33 luan/install.sh 25 luan/install.sh
34 26
35 echo done 27 echo done