forked from emqx/emqx-rel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
post-compile.cmd
46 lines (36 loc) · 904 Bytes
/
post-compile.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@echo off
:: cd %REBAR_BUILD_DIR%
:: set REBAR_BUILD_DIR=c:/Users/Gilbe/emqx/emqx_rel/_build/emqx (for debug)
rmdir /s/q "%REBAR_BUILD_DIR%\conf"
mkdir "%REBAR_BUILD_DIR%\conf\plugins"
mkdir "%REBAR_BUILD_DIR%\conf\schema"
pushd "%REBAR_BUILD_DIR%"
for /d %%i in ("lib\emqx*") do call :conf %%i
for /d %%i in ("lib\emqx*") do call :schema %%i
exit 0
:conf
pushd %1
for %%f in ("etc\*.conf") do (
:: echo %%f
if "emqx" == "%%~nf" (
copy %%f "%REBAR_BUILD_DIR%\conf\"
) else (
if "acl" == "%%~nf" (
copy %%f "%REBAR_BUILD_DIR%\conf\"
) else (
if "ssl_dist" == "%%~nf" (
copy %%f "%REBAR_BUILD_DIR%\conf\"
) else copy %%f "%REBAR_BUILD_DIR%\conf\plugins\"
)
)
)
popd
:end
:schema
pushd %1
for %%f in ("priv\*.schema") do (
::echo %%f
copy %%f "%REBAR_BUILD_DIR%\conf\schema\"
)
popd
:end