comparison scripts/build-luan.sh @ 1296:040c98e1f837

simplify build
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 10 Jan 2019 22:23:58 -0700
parents f2eb8295033f
children 04482e2a6ca3
comparison
equal deleted inserted replaced
1295:9dca1e912658 1296:040c98e1f837
1 set -e 1 set -e
2 2
3 cd `dirname $0`/.. 3 cd `dirname $0`/..
4
5 VERSION=`scripts/version.sh`
6 echo "return '$VERSION'" >src/luan/version.luan
7 4
8 rm -rf build 5 rm -rf build
9 mkdir -p build/luan/jars 6 mkdir -p build/luan/jars
10 7
11 find . -name *.class -delete 8 find . -name *.class -delete
12 9
13 . classpath.sh 10 . classpath.sh
14 javac -classpath $CLASSPATH `find src -name *.java` 11 javac -classpath $CLASSPATH `find src -name *.java`
15 cd src; jar cvf ../build/luan/jars/luan-$VERSION.jar `find . -name *.class -o -name *.luan`; cd .. 12 cd src; jar cvf ../build/luan/jars/luan.jar `find . -name *.class -o -name *.luan`; cd ..
16 cp lib/* build/luan/jars 13 cp lib/* build/luan/jars
17 14
18 cp scripts/install.sh build/luan 15 cp scripts/install.sh build/luan
19 chmod +x build/luan/install.sh 16 chmod +x build/luan/install.sh
20 cp scripts/uninstall.sh build/luan 17 cp scripts/uninstall.sh build/luan
21 18
22 cd build 19 cd build
20 VERSION=`java -classpath $CLASSPATH luan.Luan classpath:luan/version.luan`
23 tar -cf luan-$VERSION.tar luan 21 tar -cf luan-$VERSION.tar luan
24 22
25 luan/install.sh 23 luan/install.sh
26 24
27 echo done 25 echo done