apache-ignite

Форк
0
/
parseargs.bat 
52 строки · 1.7 Кб
1
::
2
:: Licensed to the Apache Software Foundation (ASF) under one or more
3
:: contributor license agreements.  See the NOTICE file distributed with
4
:: this work for additional information regarding copyright ownership.
5
:: The ASF licenses this file to You under the Apache License, Version 2.0
6
:: (the "License"); you may not use this file except in compliance with
7
:: the License.  You may obtain a copy of the License at
8
::
9
::      http://www.apache.org/licenses/LICENSE-2.0
10
::
11
:: Unless required by applicable law or agreed to in writing, software
12
:: distributed under the License is distributed on an "AS IS" BASIS,
13
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
:: See the License for the specific language governing permissions and
15
:: limitations under the License.
16
::
17

18
@echo off
19

20
::
21
:: Parses command line parameters into Ignite variables that are common for the launcher scripts:
22
:: CONFIG
23
:: INTERACTIVE
24
:: QUIET
25
:: NO_PAUSE
26
:: JVM_XOPTS
27
::
28
:: Script setups reasonable defaults (see below) for omitted arguments.
29
::
30
:: Scripts accepts following incoming variables:
31
:: DEFAULT_CONFIG
32
::
33
:: Can be used like:
34
:: call "%IGNITE_HOME%\bin\include\parseargs.bat" %*
35
:: if %ERRORLEVEL% neq 0 (
36
::     echo Arguments parsing failed
37
::     exit /b %ERRORLEVEL%
38
:: )
39
:: in other scripts to parse common command lines parameters.
40

41
set convertArgsCmd="!JAVA_HOME!\bin\java.exe" -cp "%CP%" org.apache.ignite.startup.cmdline.CommandLineTransformer %*
42

43
for /f "usebackq tokens=*" %%i in (`"!convertArgsCmd!"`) do set reformattedArgs=%%i
44

45
for %%i in (%reformattedArgs%) do (
46
    if "%%i" == "CommandLineTransformerError" exit /b 1
47
    set %%i
48
)
49

50
if not defined CONFIG set CONFIG=%DEFAULT_CONFIG%
51

52
exit /b 0
53

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.