提交 b57541fe authored 作者: Thomas Mueller's avatar Thomas Mueller

The build didn't work if the directory temp didn't exist before.

上级 7f279062
@echo off @echo off
if "%JAVA_HOME%"=="" echo Error: JAVA_HOME is not defined. if "%JAVA_HOME%"=="" echo Error: JAVA_HOME is not defined.
if exist bin/org/h2/build/Build.class goto buildOK if not exist temp mkdir temp
if not exist bin mkdir bin if not exist bin mkdir bin
if exist bin/org/h2/build/Build.class goto buildOK
javac -sourcepath src/tools -d bin src/tools/org/h2/build/*.java javac -sourcepath src/tools -d bin src/tools/org/h2/build/*.java
:buildOK :buildOK
"%JAVA_HOME%/bin/java" -Xmx512m -cp "bin;%JAVA_HOME%/lib/tools.jar;temp" org.h2.build.Build %* "%JAVA_HOME%/bin/java" -Xmx512m -cp "bin;%JAVA_HOME%/lib/tools.jar;temp" org.h2.build.Build %*
\ No newline at end of file
...@@ -2,10 +2,13 @@ ...@@ -2,10 +2,13 @@
if [ -z "$JAVA_HOME" ] ; then if [ -z "$JAVA_HOME" ] ; then
echo "Error: JAVA_HOME is not defined." echo "Error: JAVA_HOME is not defined."
fi fi
if [ ! -f "bin/org/h2/build/Build.class" ] ; then if [ ! -d "temp" ] ; then
if [ ! -d "bin" ] ; then mkdir temp
fi
if [ ! -d "bin" ] ; then
mkdir bin mkdir bin
fi fi
if [ ! -f "bin/org/h2/build/Build.class" ] ; then
javac -sourcepath src/tools -d bin src/tools/org/h2/build/*.java javac -sourcepath src/tools -d bin src/tools/org/h2/build/*.java
fi fi
"$JAVA_HOME/bin/java" -Xmx512m -cp "bin:$JAVA_HOME/lib/tools.jar:temp" org.h2.build.Build $@ "$JAVA_HOME/bin/java" -Xmx512m -cp "bin:$JAVA_HOME/lib/tools.jar:temp" org.h2.build.Build $@
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论