Mercurial Hosting > luan
changeset 238:55b4b077e5cc
improve scripts
git-svn-id: https://luan-java.googlecode.com/svn/trunk@239 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Mon, 06 Oct 2014 20:25:56 +0000 |
parents | 97d175772fed |
children | aa7bc9c1df22 |
files | dist/jars/luan-core-trunk.jar dist/jars/luan-logging-trunk.jar dist/jars/luan-lucene-trunk.jar dist/jars/luan-mail-trunk.jar dist/jars/luan-web-trunk.jar dist/scripts/build-luan.sh dist/scripts/check_luan_home.sh dist/scripts/luan-classpath.sh dist/scripts/luan-cp-ext.sh dist/scripts/luan-cp.sh dist/scripts/luan-dev-classpath.sh dist/scripts/luan-ext-classpath.sh dist/scripts/luan.sh dist/scripts/mmake.sh |
diffstat | 14 files changed, 46 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/dist/scripts/build-luan.sh Mon Oct 06 04:07:56 2014 +0000 +++ b/dist/scripts/build-luan.sh Mon Oct 06 20:25:56 2014 +0000 @@ -1,49 +1,47 @@ VERSION=trunk -cd `dirname $0`/../.. -HOME=`pwd` +. check_luan_home.sh +cd $LUAN_HOME rm dist/jars/*.jar - set -e - echo "_G._VERSION = 'Luan $VERSION'" >core/src/luan/version.luan -cd $HOME +cd $LUAN_HOME SRC=core/src -CLASSPATH=$HOME/$SRC +CLASSPATH=$LUAN_HOME/$SRC javac -classpath $CLASSPATH `find $SRC -name *.java` cd $SRC -jar cvf $HOME/dist/jars/luan-core-$VERSION.jar `find . -name *.class -o -name *.luan` +jar cvf $LUAN_HOME/dist/jars/luan-core-$VERSION.jar `find . -name *.class -o -name *.luan` -cd $HOME +cd $LUAN_HOME SRC=web/src -CLASSPATH=$HOME/core/src:$HOME/$SRC -for i in $HOME/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC +for i in $LUAN_HOME/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done javac -classpath $CLASSPATH `find $SRC -name *.java` cd $SRC -jar cvf $HOME/dist/jars/luan-web-$VERSION.jar `find . -name *.class -o -name *.luan` +jar cvf $LUAN_HOME/dist/jars/luan-web-$VERSION.jar `find . -name *.class -o -name *.luan` -cd $HOME +cd $LUAN_HOME SRC=logging/src -#CLASSPATH=$HOME/core/src:$HOME/$SRC -#for i in $HOME/logging/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +#CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC +#for i in $LUAN_HOME/logging/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done #javac -classpath $CLASSPATH `find $SRC -name *.java` cd $SRC -jar cvf $HOME/dist/jars/luan-logging-$VERSION.jar `find . -name *.class -o -name *.luan` +jar cvf $LUAN_HOME/dist/jars/luan-logging-$VERSION.jar `find . -name *.class -o -name *.luan` -cd $HOME +cd $LUAN_HOME SRC=mail/src -CLASSPATH=$HOME/core/src:$HOME/$SRC -for i in $HOME/mail/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC +for i in $LUAN_HOME/mail/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done javac -classpath $CLASSPATH `find $SRC -name *.java` cd $SRC -jar cvf $HOME/dist/jars/luan-mail-$VERSION.jar `find . -name *.class -o -name *.luan` +jar cvf $LUAN_HOME/dist/jars/luan-mail-$VERSION.jar `find . -name *.class -o -name *.luan` -cd $HOME +cd $LUAN_HOME SRC=lucene/src -CLASSPATH=$HOME/core/src:$HOME/$SRC -for i in $HOME/lucene/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +CLASSPATH=$LUAN_HOME/core/src:$LUAN_HOME/$SRC +for i in $LUAN_HOME/lucene/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done javac -classpath $CLASSPATH `find $SRC -name *.java` cd $SRC -jar cvf $HOME/dist/jars/luan-lucene-$VERSION.jar `find . -name *.class -o -name *.luan` +jar cvf $LUAN_HOME/dist/jars/luan-lucene-$VERSION.jar `find . -name *.class -o -name *.luan`
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dist/scripts/check_luan_home.sh Mon Oct 06 20:25:56 2014 +0000 @@ -0,0 +1,5 @@ +if test -z "$LUAN_HOME" +then + echo "Please define LUAN_HOME" + exit 1 +fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dist/scripts/luan-classpath.sh Mon Oct 06 20:25:56 2014 +0000 @@ -0,0 +1,3 @@ +for i in $LUAN_HOME/dist/jars/* ; do CLASSPATH=$CLASSPATH:$i ; done + +. luan-ext-classpath.sh
--- a/dist/scripts/luan-cp-ext.sh Mon Oct 06 04:07:56 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -HOME=$1 - -for i in $HOME/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done -for i in $HOME/logging/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done -for i in $HOME/mail/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done -for i in $HOME/lucene/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done
--- a/dist/scripts/luan-cp.sh Mon Oct 06 04:07:56 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -HOME=$1 - -for i in $HOME/dist/jars/* ; do CLASSPATH=$CLASSPATH:$i ; done - -. luan-cp-ext.sh $HOME
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dist/scripts/luan-dev-classpath.sh Mon Oct 06 20:25:56 2014 +0000 @@ -0,0 +1,9 @@ +CLASSPATH=~/luan/core/src +CLASSPATH=$CLASSPATH:~/luan/web/src +CLASSPATH=$CLASSPATH:~/luan/logging/src +CLASSPATH=$CLASSPATH:~/luan/mail/src +CLASSPATH=$CLASSPATH:~/luan/lucene/src + +. luan-ext-classpath.sh + +export CLASSPATH
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dist/scripts/luan-ext-classpath.sh Mon Oct 06 20:25:56 2014 +0000 @@ -0,0 +1,4 @@ +for i in $LUAN_HOME/web/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +for i in $LUAN_HOME/logging/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +for i in $LUAN_HOME/mail/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done +for i in $LUAN_HOME/lucene/ext/* ; do CLASSPATH=$CLASSPATH:$i ; done
--- a/dist/scripts/luan.sh Mon Oct 06 04:07:56 2014 +0000 +++ b/dist/scripts/luan.sh Mon Oct 06 20:25:56 2014 +0000 @@ -1,8 +1,5 @@ -CURRDIR=`pwd` -cd `dirname $0`/../.. -HOME=`pwd` -cd $CURRDIR +. check_luan_home.sh -. luan-cp.sh $HOME +. luan-classpath.sh java -classpath $CLASSPATH luan.Luan $*
--- a/dist/scripts/mmake.sh Mon Oct 06 04:07:56 2014 +0000 +++ b/dist/scripts/mmake.sh Mon Oct 06 20:25:56 2014 +0000 @@ -1,7 +1,3 @@ -CURRDIR=`pwd` -cd `dirname $0`/../.. -HOME=`pwd` -cd $CURRDIR +. check_luan_home.sh -luan.sh $HOME/dist/scripts/mmake.luan $* -echo `pwd` +luan.sh $LUAN_HOME/dist/scripts/mmake.luan $*