Skip to content

Commit

Permalink
Applied patch from issue 391.
Browse files Browse the repository at this point in the history
git-svn-id: http://google-refine.googlecode.com/svn/trunk@2070 7d457c2a-affb-35e4-300a-418c747d4874
  • Loading branch information
[email protected] committed May 25, 2011
1 parent 9f41bb1 commit 361d93f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 18 deletions.
36 changes: 23 additions & 13 deletions refine.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
rem
rem Configuration variables
rem
rem ANT_HOME
rem Home of Ant installation; copy is in the source as tools\apache-ant-*
rem
rem JAVA_HOME
rem Home of Java installation.
rem
Expand Down Expand Up @@ -40,7 +43,7 @@ echo /x enable JMX monitoring (for jconsole and friends)
echo.
echo and <action> is one of
echo.
echo build ..................... Build Google Refine
echo build ..................... Build Google Refine
echo run ....................... Run Google Refine
echo.
echo clean ..................... Clean compiled classes
Expand All @@ -54,25 +57,27 @@ goto end

:endUtils

rem --- Read ini file -----------------------------------------------

set OPTS=

for /f "tokens=1,* delims==" %%a in (refine.ini) do (
set %%a=%%b
)

rem --- Check JAVA_HOME ---------------------------------------------

if not "%JAVA_HOME%" == "" goto gotJavaHome
echo You must set JAVA_HOME to point at your Java Development Kit installation
echo.
echo If you don't know how to do this, follow the instructions at
echo If you don't know how to do this, follow the instructions at
echo.
echo http://bit.ly/1c2gkR
echo.

goto fail
:gotJavaHome

rem --- Read ini file --------------------------------------------

set OPTS=

for /f "tokens=1,2 delims==" %%a in (refine.ini) do (
set %%a=%%b
)

rem --- Argument parsing --------------------------------------------

:loop
Expand Down Expand Up @@ -109,7 +114,7 @@ goto shift2loop

:arg-x
set OPTS=%OPTS% -Dcom.sun.management.jmxremote
goto shift2loop
goto shift2loop

:shift2loop
shift
Expand Down Expand Up @@ -137,9 +142,14 @@ set OPTS=%OPTS% -Drefine.port=%REFINE_PORT%

if not "%REFINE_HOST%" == "" goto gotHost
set REFINE_HOST=127.0.0.1
:gotHOST
:gotHost
set OPTS=%OPTS% -Drefine.host=%REFINE_HOST%

if not "%REFINE_WEBAPP%" == "" goto gotWebApp
set REFINE_WEBAPP=main\webapp
:gotWebApp
set OPTS=%OPTS% -Drefine.webapp=%REFINE_WEBAPP%

if not "%REFINE_CLASSES_DIR%" == "" goto gotClassesDir
set REFINE_CLASSES_DIR=server\classes
:gotClassesDir
Expand Down Expand Up @@ -170,7 +180,7 @@ echo You can download it from
echo.
echo http://ant.apache.org/
echo.
echo If you don't know how to set environment variables, follow the instructions at
echo If you don't know how to set environment variables, follow the instructions at
echo.
echo http://bit.ly/1c2gkR
echo.
Expand Down
13 changes: 8 additions & 5 deletions refine.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#REFINES_PORT=3333
#REFINES_HOST=127.0.0.1
#REFINES_MEMORY=1024M
#REFINE_PORT=3333
#REFINE_HOST=127.0.0.1
#REFINE_WEBAPP=main\webapp
#REFINE_MEMORY=1024M

#JAVA_HOME=""
#JAVA_OPTIONS="-XX:+UseParallelGC -XX:+UseLargePages"
# Some sample configurations. These have no defaults.
#ANT_HOME=C:\grefine\tools\apache-ant-1.8.1
#JAVA_HOME=C:\Program Files\Java\jdk1.6.0_25
#JAVA_OPTIONS=-XX:+UseParallelGC -verbose:gc -Drefine.headless=true

0 comments on commit 361d93f

Please sign in to comment.