"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/bin/elasticsearch.bat" (6 Jan 2022, 1559 Bytes) of package /linux/www/elasticsearch-6.8.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) MS DOS Batch source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


    1 @echo off
    2 
    3 setlocal enabledelayedexpansion
    4 setlocal enableextensions
    5 
    6 SET params='%*'
    7 
    8 :loop
    9 FOR /F "usebackq tokens=1* delims= " %%A IN (!params!) DO (
   10     SET current=%%A
   11     SET params='%%B'
   12     SET silent=N
   13 
   14     IF "!current!" == "-s" (
   15         SET silent=Y
   16     )
   17     IF "!current!" == "--silent" (
   18         SET silent=Y
   19     )
   20 
   21     IF "!silent!" == "Y" (
   22         SET nopauseonerror=Y
   23     ) ELSE (
   24         IF "x!newparams!" NEQ "x" (
   25             SET newparams=!newparams! !current!
   26         ) ELSE (
   27             SET newparams=!current!
   28         )
   29     )
   30 
   31     IF "x!params!" NEQ "x" (
   32         GOTO loop
   33     )
   34 )
   35 
   36 CALL "%~dp0elasticsearch-env.bat" || exit /b 1
   37 IF ERRORLEVEL 1 (
   38     IF NOT DEFINED nopauseonerror (
   39         PAUSE
   40     )
   41     EXIT /B %ERRORLEVEL%
   42 )
   43 
   44 set ES_JVM_OPTIONS=%ES_PATH_CONF%\jvm.options
   45 @setlocal
   46 for /F "usebackq delims=" %%a in (`CALL %JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.JvmOptionsParser" "!ES_JVM_OPTIONS!" ^|^| echo jvm_options_parser_failed`) do set JVM_OPTIONS=%%a
   47 @endlocal & set "MAYBE_JVM_OPTIONS_PARSER_FAILED=%JVM_OPTIONS%" & set ES_JAVA_OPTS=%JVM_OPTIONS:${ES_TMPDIR}=!ES_TMPDIR!% %ES_JAVA_OPTS%
   48 
   49 if "%MAYBE_JVM_OPTIONS_PARSER_FAILED%" == "jvm_options_parser_failed" (
   50   exit /b 1
   51 )
   52 
   53 cd /d "%ES_HOME%"
   54 %JAVA% %ES_JAVA_OPTS% -Delasticsearch -Des.path.home="%ES_HOME%" -Des.path.conf="%ES_PATH_CONF%" -Des.distribution.flavor="%ES_DISTRIBUTION_FLAVOR%" -Des.distribution.type="%ES_DISTRIBUTION_TYPE%" -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" !newparams!
   55 
   56 endlocal
   57 endlocal
   58 exit /b %ERRORLEVEL%