Mercurial Hosting > luan
changeset 173:58c6ca5d4524
fix build.sh
git-svn-id: https://luan-java.googlecode.com/svn/trunk@174 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Sun, 22 Jun 2014 07:46:49 +0000 |
parents | 4edbf3204ca6 |
children | 609c5b3118db |
files | build.sh core/src/luan/LuanState.java dist/luan-core-trunk.jar dist/luan-web-trunk.jar web/src/luan/modules/web/HttpLuan.java web/src/luan/modules/web/web_run.luan web/src/luan/modules/web/web_shell.luan |
diffstat | 7 files changed, 31 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/build.sh Sun Jun 22 06:12:29 2014 +0000 +++ b/build.sh Sun Jun 22 07:46:49 2014 +0000 @@ -1,15 +1,25 @@ VERSION=trunk -echo "_G._VERSION = 'Luan $VERSION'" >`pwd`/core/src/luan/version.luan + +cd `dirname $0` +HOME=`pwd` rm dist/*.jar -SRC=`pwd`/core/src -CLASSPATH=$SRC -javac `find $SRC -name *.java` -jar cvf dist/luan-core-$VERSION.jar `find $SRC -name *.class -o -name *.luan` +set -e + +echo "_G._VERSION = 'Luan $VERSION'" >core/src/luan/version.luan -SRC=`pwd`/web/src -CLASSPATH=`pwd`/core/src:$SRC -for i in `pwd`/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done -javac `find $SRC -name *.java` -jar cvf dist/luan-web-$VERSION.jar `find $SRC -name *.class -o -name *.luan` +cd $HOME +SRC=core/src +CLASSPATH=$HOME/$SRC +javac -classpath $CLASSPATH `find $SRC -name *.java` +cd $SRC +jar cvf $HOME/dist/luan-core-$VERSION.jar `find . -name *.class -o -name *.luan` + +cd $HOME +SRC=web/src +CLASSPATH=$HOME/core/src:$HOME/$SRC +for i in $HOME/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +javac -classpath $CLASSPATH `find $SRC -name *.java` +cd $SRC +jar cvf $HOME/dist/luan-web-$VERSION.jar `find . -name *.class -o -name *.luan`
--- a/core/src/luan/LuanState.java Sun Jun 22 06:12:29 2014 +0000 +++ b/core/src/luan/LuanState.java Sun Jun 22 07:46:49 2014 +0000 @@ -122,9 +122,13 @@ return t.put(a[a.length-1],value); } - public final void globalImport(String modName) throws LuanException { - Object mod = PackageLuan.require(this,modName); - global.put(modName,mod); + public final void globalImport(String modName) { + try { + Object mod = PackageLuan.require(this,modName); + global.put(modName,mod); + } catch(LuanException e) { + throw new RuntimeException(e); + } } public static LuanState newStandard() {
--- a/web/src/luan/modules/web/HttpLuan.java Sun Jun 22 06:12:29 2014 +0000 +++ b/web/src/luan/modules/web/HttpLuan.java Sun Jun 22 07:46:49 2014 +0000 @@ -63,9 +63,9 @@ } } - LuanTable module = (LuanTable)luan.loaded().get("Http"); + LuanTable module = (LuanTable)luan.loaded().get("web.Http"); if( module == null ) - throw luan.exception( "module 'Http' not defined" ); + throw luan.exception( "module 'web.Http' not defined" ); HttpLuan lib = new HttpLuan(request,response); try { module.put( "request", lib.requestTable() );