mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Accept output argument in tools/opt_types.sh
This commit is contained in:
parent
cfaed70fe3
commit
56a0e736c7
@ -123,7 +123,7 @@ hooks: all
|
|||||||
tools/hook_deps.sh ebin
|
tools/hook_deps.sh ebin
|
||||||
|
|
||||||
options: all
|
options: all
|
||||||
tools/opt_types.sh ebin
|
tools/opt_types.sh ejabberd_option ebin
|
||||||
|
|
||||||
translations:
|
translations:
|
||||||
tools/prepare-tr.sh
|
tools/prepare-tr.sh
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
specs = #{} :: map(),
|
specs = #{} :: map(),
|
||||||
mod_specs = #{} :: map()}).
|
mod_specs = #{} :: map()}).
|
||||||
|
|
||||||
main(Paths) ->
|
main([Mod|Paths]) ->
|
||||||
State = fold_beams(
|
State = fold_beams(
|
||||||
fun(File, Form, StateAcc) ->
|
fun(File, Form, StateAcc) ->
|
||||||
append(Form, File, StateAcc)
|
append(Form, File, StateAcc)
|
||||||
@ -19,13 +19,13 @@ main(Paths) ->
|
|||||||
emit_modules(map_to_specs(State#state.m_opts,
|
emit_modules(map_to_specs(State#state.m_opts,
|
||||||
State#state.mod_defaults,
|
State#state.mod_defaults,
|
||||||
State#state.mod_specs)),
|
State#state.mod_specs)),
|
||||||
emit_config(map_to_specs(State#state.g_opts,
|
emit_config(Mod,
|
||||||
|
map_to_specs(State#state.g_opts,
|
||||||
State#state.defaults,
|
State#state.defaults,
|
||||||
State#state.specs),
|
State#state.specs),
|
||||||
State#state.globals).
|
State#state.globals).
|
||||||
|
|
||||||
emit_config(Specs, Globals) ->
|
emit_config(Mod, Specs, Globals) ->
|
||||||
Mod = "ejabberd_option",
|
|
||||||
File = filename:join("src", Mod ++ ".erl"),
|
File = filename:join("src", Mod ++ ".erl"),
|
||||||
case file:open(File, [write]) of
|
case file:open(File, [write]) of
|
||||||
{ok, Fd} ->
|
{ok, Fd} ->
|
||||||
|
Loading…
Reference in New Issue
Block a user