view scripts/build-luan.sh @ 1053:7e4b41247544

fix JBuffer.array()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 08 Nov 2016 00:32:02 -0700
parents 49cbf6ee529f
children 0d884377e923
line wrap: on
line source

set -e

cd `dirname $0`/..
LUAN_HOME=`pwd`
LUAN_BUILD=$LUAN_HOME/build
SLF4J=$LUAN_HOME/logging/ext/slf4j-api-1.6.4.jar

VERSION=`scripts/version.sh`

rm -rf $LUAN_BUILD
mkdir $LUAN_BUILD
mkdir $LUAN_BUILD/luan
mkdir $LUAN_BUILD/luan/jars

cd $LUAN_HOME
echo "return '$VERSION'" >src/luan/version.luan
find . -name *.class -delete

CLASSPATH=$LUAN_HOME/src
for i in $LUAN_HOME/lib/* ; do CLASSPATH=$CLASSPATH:$i ; done
cd src
javac -classpath $CLASSPATH `find . -name *.java`
jar cvf $LUAN_BUILD/luan/jars/luan-$VERSION.jar `find . -name *.class -o -name *.luan -o -name *.css -o -name *.properties`
cp $LUAN_HOME/lib/* $LUAN_BUILD/luan/jars

cp $LUAN_HOME/scripts/install.sh $LUAN_BUILD/luan
chmod +x $LUAN_BUILD/luan/install.sh
cp $LUAN_HOME/scripts/uninstall.sh $LUAN_BUILD/luan

cd $LUAN_BUILD
tar -cf luan-$VERSION.tar luan

luan/install.sh

echo done