2010-02-08 08:30:06 -05:00
|
|
|
@echo off
|
|
|
|
|
2015-01-06 09:35:47 -05:00
|
|
|
SETLOCAL enabledelayedexpansion
|
2014-07-06 05:30:11 -04:00
|
|
|
TITLE Elasticsearch ${project.version}
|
|
|
|
|
2015-01-06 09:35:47 -05:00
|
|
|
SET params='%*'
|
|
|
|
|
|
|
|
:loop
|
|
|
|
FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO (
|
|
|
|
SET current=%%A
|
|
|
|
SET params='%%B'
|
|
|
|
SET silent=N
|
|
|
|
|
|
|
|
IF "!current!" == "-s" (
|
|
|
|
SET silent=Y
|
|
|
|
)
|
|
|
|
IF "!current!" == "--silent" (
|
|
|
|
SET silent=Y
|
|
|
|
)
|
|
|
|
|
|
|
|
IF "!silent!" == "Y" (
|
|
|
|
SET nopauseonerror=Y
|
|
|
|
) ELSE (
|
|
|
|
IF "x!newparams!" NEQ "x" (
|
|
|
|
SET newparams=!newparams! !current!
|
|
|
|
) ELSE (
|
|
|
|
SET newparams=!current!
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
IF "x!params!" NEQ "x" (
|
|
|
|
GOTO loop
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2014-11-10 17:10:24 -05:00
|
|
|
CALL "%~dp0elasticsearch.in.bat"
|
2015-01-06 09:35:47 -05:00
|
|
|
IF ERRORLEVEL 1 (
|
|
|
|
IF NOT DEFINED nopauseonerror (
|
|
|
|
PAUSE
|
|
|
|
)
|
|
|
|
EXIT /B %ERRORLEVEL%
|
|
|
|
)
|
2010-02-08 08:30:06 -05:00
|
|
|
|
2015-01-06 09:35:47 -05:00
|
|
|
"%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% !newparams! -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch"
|
2010-02-08 08:30:06 -05:00
|
|
|
|
2014-01-06 15:58:46 -05:00
|
|
|
ENDLOCAL
|