changeset 308:869d2263de5d

move scripts git-svn-id: https://luan-java.googlecode.com/svn/trunk@309 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Tue, 23 Dec 2014 05:48:49 +0000
parents 4bf49f0a46b3
children 6bf47e28e0e5
files dist/scripts/build-luan.sh dist/scripts/check_luan_home.sh dist/scripts/install.sh dist/scripts/luan-classpath.sh dist/scripts/mmake.luan dist/scripts/mmake.sh dist/scripts/test.luan dist/scripts/uninstall.sh scripts/build-luan.sh scripts/check_luan_home.sh scripts/install.sh scripts/luan-classpath.sh scripts/mmake.luan scripts/mmake.sh scripts/test.luan scripts/uninstall.sh
diffstat 16 files changed, 165 insertions(+), 165 deletions(-) [+]
line wrap: on
line diff
--- a/dist/scripts/build-luan.sh	Tue Dec 23 05:28:51 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-VERSION=`svnversion`
-
-if echo $VERSION | grep :
-then
-	echo "svn update needed"
-	exit 1
-fi
-
-
-LUAN_BUILD=~/luanbuild
-
-. check_luan_home.sh
-
-set -e
-
-rm -rf $LUAN_BUILD
-mkdir $LUAN_BUILD
-mkdir $LUAN_BUILD/luan
-mkdir $LUAN_BUILD/luan/jars
-
-cd $LUAN_HOME
-echo "_G._VERSION = 'Luan $VERSION'" >core/src/luan/version.luan
-
-cd $LUAN_HOME
-SRC=core/src
-CLASSPATH=$LUAN_HOME/$SRC
-javac -classpath $CLASSPATH `find $SRC -name *.java`
-cd $SRC
-jar cvf $LUAN_BUILD/luan/jars/luan-core-$VERSION.jar `find . -name *.class -o -name *.luan`
-
-cd $LUAN_HOME
-SRC=web/src
-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 $LUAN_BUILD/luan/jars/luan-web-$VERSION.jar `find . -name *.class -o -name *.luan`
-
-cd $LUAN_HOME
-SRC=logging/src
-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 $LUAN_BUILD/luan/jars/luan-logging-$VERSION.jar `find . -name *.class -o -name *.luan`
-
-cd $LUAN_HOME
-SRC=mail/src
-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 $LUAN_BUILD/luan/jars/luan-mail-$VERSION.jar `find . -name *.class -o -name *.luan`
-
-cd $LUAN_HOME
-SRC=lucene/src
-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 $LUAN_BUILD/luan/jars/luan-lucene-$VERSION.jar `find . -name *.class -o -name *.luan`
-
-cp $LUAN_HOME/web/ext/* $LUAN_BUILD/luan/jars
-cp $LUAN_HOME/logging/ext/* $LUAN_BUILD/luan/jars
-cp $LUAN_HOME/mail/ext/* $LUAN_BUILD/luan/jars
-cp $LUAN_HOME/lucene/ext/* $LUAN_BUILD/luan/jars
-
-cp $LUAN_HOME/dist/scripts/install.sh $LUAN_BUILD/luan
-chmod +x $LUAN_BUILD/luan/install.sh
-cp $LUAN_HOME/dist/scripts/uninstall.sh $LUAN_BUILD/luan
-
-cd $LUAN_BUILD
-tar -cf luan-$VERSION.tar luan
--- a/dist/scripts/check_luan_home.sh	Tue Dec 23 05:28:51 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-if test -z "$LUAN_HOME"
-then
-	echo "Please define LUAN_HOME"
-	exit 1
-fi
--- a/dist/scripts/install.sh	Tue Dec 23 05:28:51 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-cd `dirname $0`
-
-cat >/usr/local/bin/luan <<End
-for i in `pwd`/jars/* ; do CLASSPATH=\$CLASSPATH:\$i ; done
-
-java -classpath \$CLASSPATH luan.Luan \$*
-End
-
-chmod +x /usr/local/bin/luan
-
-echo "the command 'luan' has been installed"
--- a/dist/scripts/luan-classpath.sh	Tue Dec 23 05:28:51 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-. check_luan_home.sh
-
-CLASSPATH=$LUAN_HOME/core/src
-CLASSPATH=$CLASSPATH:$LUAN_HOME/web/src
-CLASSPATH=$CLASSPATH:$LUAN_HOME/logging/src
-CLASSPATH=$CLASSPATH:$LUAN_HOME/mail/src
-CLASSPATH=$CLASSPATH:$LUAN_HOME/lucene/src
-
-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
-
-export CLASSPATH
--- a/dist/scripts/mmake.luan	Tue Dec 23 05:28:51 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-import "luan:Table"
-import "luan:Io"
-import "luan:String"
-import "luan:Time"
-
-compiler = Table.concat( { "javac -g -encoding UTF8", ... }, " " )
-
-function mmake(dir)
-	local java = {}
-	local dirs = {}
-	for _, file in ipairs(dir.children()) do
-		local name = file.name()
-		if name.match ".java$" ~= nil then
-			java[#java+1] = name.sub(1,-6)
-		end
-		if file.is_directory() and mmake(file) then
-			dirs[#dirs+1] = name
-		end
-	end
-	if #java == 0 and #dirs == 0 then
-		return false;
-	end
-	local out = dir.child("Makefile").text_writer()
-	out.write( header() )
-	for _, s in ipairs(java) do
-		out.write( "\\\n\t\t",  s , ".class" )
-	end
-	for _, s in ipairs(dirs) do
-		out.write( "\n\tcd ", s, ";  make all" )
-	end
-	out.write "\n\nclean:\n\trm -f *.class\n"
-	for _, s in ipairs(dirs) do
-		out.write( "\tcd ", s, ";  make clean\n" )
-	end
-	out.close()
-	print(dir.to_string())
-	return true
-end
-
-
-function header()
-	return 	%>
-# Makefile created on <%=Time.format(Time.now())%> by Mmake
-
-.SUFFIXES: .java .class
-
-.java.class:
-	<%=compiler%> $<
-
-all: <%
-end
-
-mmake(Io.schemes.file ".")
--- a/dist/scripts/mmake.sh	Tue Dec 23 05:28:51 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-. check_luan_home.sh
-
-luan.sh $LUAN_HOME/dist/scripts/mmake.luan $*
--- a/dist/scripts/test.luan	Tue Dec 23 05:28:51 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-do_file "luan:web/test.luan"
--- a/dist/scripts/uninstall.sh	Tue Dec 23 05:28:51 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-rm /usr/local/bin/luan
-
-cd `dirname $0`
-echo "luan has been uninstalled"
-echo "you can now delete `pwd`"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/build-luan.sh	Tue Dec 23 05:48:49 2014 +0000
@@ -0,0 +1,73 @@
+VERSION=`svnversion`
+
+if echo $VERSION | grep :
+then
+	echo "svn update needed"
+	exit 1
+fi
+
+
+LUAN_BUILD=~/luanbuild
+
+. check_luan_home.sh
+
+set -e
+
+rm -rf $LUAN_BUILD
+mkdir $LUAN_BUILD
+mkdir $LUAN_BUILD/luan
+mkdir $LUAN_BUILD/luan/jars
+
+cd $LUAN_HOME
+echo "_G._VERSION = 'Luan $VERSION'" >core/src/luan/version.luan
+
+cd $LUAN_HOME
+SRC=core/src
+CLASSPATH=$LUAN_HOME/$SRC
+javac -classpath $CLASSPATH `find $SRC -name *.java`
+cd $SRC
+jar cvf $LUAN_BUILD/luan/jars/luan-core-$VERSION.jar `find . -name *.class -o -name *.luan`
+
+cd $LUAN_HOME
+SRC=web/src
+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 $LUAN_BUILD/luan/jars/luan-web-$VERSION.jar `find . -name *.class -o -name *.luan`
+
+cd $LUAN_HOME
+SRC=logging/src
+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 $LUAN_BUILD/luan/jars/luan-logging-$VERSION.jar `find . -name *.class -o -name *.luan`
+
+cd $LUAN_HOME
+SRC=mail/src
+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 $LUAN_BUILD/luan/jars/luan-mail-$VERSION.jar `find . -name *.class -o -name *.luan`
+
+cd $LUAN_HOME
+SRC=lucene/src
+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 $LUAN_BUILD/luan/jars/luan-lucene-$VERSION.jar `find . -name *.class -o -name *.luan`
+
+cp $LUAN_HOME/web/ext/* $LUAN_BUILD/luan/jars
+cp $LUAN_HOME/logging/ext/* $LUAN_BUILD/luan/jars
+cp $LUAN_HOME/mail/ext/* $LUAN_BUILD/luan/jars
+cp $LUAN_HOME/lucene/ext/* $LUAN_BUILD/luan/jars
+
+cp $LUAN_HOME/dist/scripts/install.sh $LUAN_BUILD/luan
+chmod +x $LUAN_BUILD/luan/install.sh
+cp $LUAN_HOME/dist/scripts/uninstall.sh $LUAN_BUILD/luan
+
+cd $LUAN_BUILD
+tar -cf luan-$VERSION.tar luan
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/check_luan_home.sh	Tue Dec 23 05:48:49 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/scripts/install.sh	Tue Dec 23 05:48:49 2014 +0000
@@ -0,0 +1,11 @@
+cd `dirname $0`
+
+cat >/usr/local/bin/luan <<End
+for i in `pwd`/jars/* ; do CLASSPATH=\$CLASSPATH:\$i ; done
+
+java -classpath \$CLASSPATH luan.Luan \$*
+End
+
+chmod +x /usr/local/bin/luan
+
+echo "the command 'luan' has been installed"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/luan-classpath.sh	Tue Dec 23 05:48:49 2014 +0000
@@ -0,0 +1,14 @@
+. check_luan_home.sh
+
+CLASSPATH=$LUAN_HOME/core/src
+CLASSPATH=$CLASSPATH:$LUAN_HOME/web/src
+CLASSPATH=$CLASSPATH:$LUAN_HOME/logging/src
+CLASSPATH=$CLASSPATH:$LUAN_HOME/mail/src
+CLASSPATH=$CLASSPATH:$LUAN_HOME/lucene/src
+
+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
+
+export CLASSPATH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/mmake.luan	Tue Dec 23 05:48:49 2014 +0000
@@ -0,0 +1,53 @@
+import "luan:Table"
+import "luan:Io"
+import "luan:String"
+import "luan:Time"
+
+compiler = Table.concat( { "javac -g -encoding UTF8", ... }, " " )
+
+function mmake(dir)
+	local java = {}
+	local dirs = {}
+	for _, file in ipairs(dir.children()) do
+		local name = file.name()
+		if name.match ".java$" ~= nil then
+			java[#java+1] = name.sub(1,-6)
+		end
+		if file.is_directory() and mmake(file) then
+			dirs[#dirs+1] = name
+		end
+	end
+	if #java == 0 and #dirs == 0 then
+		return false;
+	end
+	local out = dir.child("Makefile").text_writer()
+	out.write( header() )
+	for _, s in ipairs(java) do
+		out.write( "\\\n\t\t",  s , ".class" )
+	end
+	for _, s in ipairs(dirs) do
+		out.write( "\n\tcd ", s, ";  make all" )
+	end
+	out.write "\n\nclean:\n\trm -f *.class\n"
+	for _, s in ipairs(dirs) do
+		out.write( "\tcd ", s, ";  make clean\n" )
+	end
+	out.close()
+	print(dir.to_string())
+	return true
+end
+
+
+function header()
+	return 	%>
+# Makefile created on <%=Time.format(Time.now())%> by Mmake
+
+.SUFFIXES: .java .class
+
+.java.class:
+	<%=compiler%> $<
+
+all: <%
+end
+
+mmake(Io.schemes.file ".")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/mmake.sh	Tue Dec 23 05:48:49 2014 +0000
@@ -0,0 +1,3 @@
+. check_luan_home.sh
+
+luan.sh $LUAN_HOME/dist/scripts/mmake.luan $*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/test.luan	Tue Dec 23 05:48:49 2014 +0000
@@ -0,0 +1,1 @@
+do_file "luan:web/test.luan"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/uninstall.sh	Tue Dec 23 05:48:49 2014 +0000
@@ -0,0 +1,5 @@
+rm /usr/local/bin/luan
+
+cd `dirname $0`
+echo "luan has been uninstalled"
+echo "you can now delete `pwd`"