Skip to content

Commit e9feccb

Browse files
authored
ETCM-491 Use etc.conf as default config file (#880)
1 parent 84a2f9b commit e9feccb

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

src/universal/bin/mantis-launcher

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ CONFIG_FILE="./conf/$1.conf"
77
if [ -f "$CONFIG_FILE" ]; then
88
shift
99
CHAIN_PARAM="-Dconfig.file=$CONFIG_FILE"
10+
elif [ -z "$1" ]; then
11+
CHAIN_PARAM="-Dconfig.file=./conf/etc.conf"
1012
fi
1113

1214
./bin/mantis ${CHAIN_PARAM:+"$CHAIN_PARAM"} "$@"

src/universal/bin/mantis-launcher.bat

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ cd "%~dp0\.."
55
set "CONFIG_FILE=conf\%1.conf"
66
set "RESTVAR=%*"
77

8-
if not exist %CONFIG_FILE% goto :skip
9-
set "CHAIN_PARAM=-Dconfig.file=%CONFIG_FILE%"
10-
set RESTVAR=
8+
if exist %CONFIG_FILE% goto :set_chain_param
9+
10+
if "%1"=="" set "CHAIN_PARAM=-Dconfig.file=conf\etc.conf"
11+
goto :launch
12+
13+
:set_chain_param
14+
set "CHAIN_PARAM=-Dconfig.file=%CONFIG_FILE%"
15+
set RESTVAR=
16+
shift
17+
:loop
18+
if "%1"=="" goto :launch
19+
set RESTVAR=%RESTVAR% %1
1120
shift
12-
:loop
13-
if "%1"=="" goto skip
14-
set RESTVAR=%RESTVAR% %1
15-
shift
16-
goto loop
21+
goto :loop
1722

18-
:skip
23+
:launch
1924
call bin\mantis.bat %CHAIN_PARAM% %RESTVAR%

0 commit comments

Comments
 (0)