Mercurial Hosting > luan
changeset 1123:f2eb8295033f
improve scripts
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 14 Aug 2017 17:39:08 -0600 |
parents | e15be31cee92 |
children | ea7112e9eb1d |
files | classpath.sh scripts/build-luan.sh scripts/cp-luan |
diffstat | 3 files changed, 20 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
diff -r e15be31cee92 -r f2eb8295033f classpath.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/classpath.sh Mon Aug 14 17:39:08 2017 -0600 @@ -0,0 +1,9 @@ +LUAN_HOME=`pwd` + +CLASSPATH=$LUAN_HOME/src + +for file in $LUAN_HOME/lib/*; do + CLASSPATH=$CLASSPATH:$file; +done + +export CLASSPATH
diff -r e15be31cee92 -r f2eb8295033f scripts/build-luan.sh --- a/scripts/build-luan.sh Mon Aug 14 17:00:37 2017 -0600 +++ b/scripts/build-luan.sh Mon Aug 14 17:39:08 2017 -0600 @@ -1,33 +1,25 @@ 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` +echo "return '$VERSION'" >src/luan/version.luan -rm -rf $LUAN_BUILD -mkdir $LUAN_BUILD -mkdir $LUAN_BUILD/luan -mkdir $LUAN_BUILD/luan/jars +rm -rf build +mkdir -p 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` -cp $LUAN_HOME/lib/* $LUAN_BUILD/luan/jars +. classpath.sh +javac -classpath $CLASSPATH `find src -name *.java` +cd src; jar cvf ../build/luan/jars/luan-$VERSION.jar `find . -name *.class -o -name *.luan`; cd .. +cp lib/* 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 +cp scripts/install.sh build/luan +chmod +x build/luan/install.sh +cp scripts/uninstall.sh build/luan -cd $LUAN_BUILD +cd build tar -cf luan-$VERSION.tar luan luan/install.sh
diff -r e15be31cee92 -r f2eb8295033f scripts/cp-luan --- a/scripts/cp-luan Mon Aug 14 17:00:37 2017 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -LUAN_HOME=~/hg/luan - -CLASSPATH=$LUAN_HOME/src - -for i in $LUAN_HOME/lib/* ; do CLASSPATH=$CLASSPATH:$i ; done - -export CLASSPATH